DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

XTabel - Change ComboBox entry for Cell

Hi There,

 

I am trying to use the XTable to display/select few informations to the user; I have 3 columns, the 3rd column has a combobox, the values of the combobox in each row is based on its 2nd column value in the same row. Right now we have EventColCtrlPreSet event to configure the combo values for the column, and we obtain the same list of items in all the rows, but I would need to change the combo list based on the row and not have the same values for each row.

 

Can someone help me out on this?

 

Thanks in advance

Priya Swaminathan

0 Kudos
Message 1 of 10
(5,791 Views)

Hi Priya,

 

are there any news?

 

I've got a similar problem, with editing Comboboxes in XTable:

Wenn I change once the Text of a Combobox all the rest Comboboxes in the column are changed too (I also tested this with text cells but there is only the cell I selected with the IF-Case changed.):

 

I select the Combobox by IF-Case:

code.png

 

and this is the result:

result.png

 

 

 

I use the event "EventValGet" because I geht there Row, Col, and Cell.

 

 

Does anyone know the reasons for this behaviour?

 

 

Kind regards

Tanja

0 Kudos
Message 2 of 10
(5,566 Views)

Hi Tanja,

 

Please post your SUDialog file and let me know what DIAdem version you're using, and I'll look into this for you.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 10
(5,557 Views)

Hi Brad,

 

thanks for your help.

 

The SUD is attached, and here are the verions I use:

 

version.png

 

dialogeditor.png

 

 

Kind regards

Tanja

0 Kudos
Message 4 of 10
(5,539 Views)

Hi Tanja,

 

I'm not sure this is really what you want, but it is what you asked for.  I configured the col=2 of the XTable control to have 2 combobox values:

 

0 ==> ""

1 ==> "Test"

 

Then I changed your GetValue... callback to assign the Cell.Value.  Now only the row you indicated displays the "Test" text.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 5 of 10
(5,525 Views)

And now the attachment...

0 Kudos
Message 6 of 10
(5,524 Views)

Hi Brad,

 

thanks for your answer.

 

In your example you set all cells of column 2:

02_alle_Zellen.png

 

 

But my Problem is to set only a singele cell and leave the rest cells like the user has set them (in your example user made changes in column 2 would be changed to " ").

 

 

Is this possible to change only the value of one single combobox and leave the rest comboboxes of the column like they are?

 

Kind regards

Tanja

0 Kudos
Message 7 of 10
(5,495 Views)

Hi Tanja,

 

It's easy enough to remove the > 2 branch of the IF statement, but the default value of the XTable cell is "?".  How is it exactly that your user "has set them" (the cell values)?  You can configure your XTable to allow the user to choose/edit the value of a given cell, but what should appear in the XTable when the SUDialog first launches?  Where do those desired cell values come from?  If the user selected them, where were they stored prior to the SUDialog launching?

 

Brad Turpin

DIAdem Product Support Engineer
National Insturments

0 Kudos
Message 8 of 10
(5,474 Views)

I think, Tanja wants to program a dialog like in the Script-DAC block, where the user can select with a ComboBox inside the table for each channel (Row) separately  "YES" or"NO" and this is what I need now too.

You showed in your example how to display the value of the ComboBox, but how  to get it (which procedure, which code), when the user has chosen it?

0 Kudos
Message 9 of 10
(4,870 Views)

I created a SUD with a XTable in which the second column a combobox is.

 

This example runs with DIAdem 2010, 2011 and 2012.

 

Greetings

Walter

Download All
0 Kudos
Message 10 of 10
(4,859 Views)