Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Need to find the selected value in combo within an infragistics grid.
posted

I have different arrays bound to the combo on each data row. This is in continuation with sample provided in 

http://www.infragistics.com/community/forums/t/92694.aspx

I have an igGrid (2013.2 version) with virtualization set to true and mode as continuous. The grid has Updating feature with cell mode editing enabled. 

1. On click of button, I would like to retrieve the value selected in each combo box.
2. Also, I need to make the default value to set to the first value if array length is 1, else, I need to display default value as blank. 
 Can you please suggest the best way to achieve the same.
Thanks,
Anitha
Parents
  • 16310
    Offline posted

    Hello Anitha,

    1) Please note that the combo is available only when you enter edit mode of a cell. This means you should get the value of the grid's cell rather than the selected value in the combo. So you can use the getCellValue method as follows:

    $("#grdCriteria").igGrid("getCellValue", rowID,"SearchField");

    You can see the sample attached ( I have used the same sample from the other thread for consistency).  On button click event the value of the SearchField on the first row is taken and wriitten into a text box. However you can go thorugh all rows and all columns with a for loop and get all cells' value.

    2) You can use the NullText property of the combo to display as blank like this:

    nullText: " " // empty string

    " I need to make the default value to set to the first value if array length is 1 " - please clarify at that time would you like to do this - is oit when you open the dropdown ?

    Looking forward to hearing from you.

    igGridDifferentComboInRow.zip
Reply Children