I have an Ultragrid that I am using a datatable as a datasource. For one of the columns, I set the style to DropDownValidate and set the editorControl of that cell to a ultracombo of which I set the datasource to a filtered datatable, which works fine. Although it is annoying to have a 0 show up when there is no value in the combo column, but that is not important. Once the user selects a value in this dropdown and moves to another cell or control outside the grid, I want to be able to access the value the user selected. I can't. I get the old value.
I have tried using the CellChange event and calling the update method on the row. I also tried changing the combo to a dropdownlist and calling the update method in the cellchange event, but that didn't work. I tried to access the editorresolved property on the cell and when I access it's Value property, I get a system argument exception. I have also tried to call ExitEditMode in the AfterCellListCloseUp and AfterCellUpdate events. Didn't work
All I want to do is get the value of the dropdown item the user selected. This is especially hard when there is only one row in the grid. Is there any other way to get this value?
Hello Mike,
I have put together a sample project based on the behavior that you have described in your original post, and I cannot seem to reproduce the behavior that you are seeing in which the underlying DataTable’s row value is not updated when updating the value of the UltraCombo. When I access each row in the code-behind, I am seeing that the underlying value is updated as shown in the UltraGrid cell.
I have attached the sample project I used to test this. Please test this project on your PC; whether or not it works correctly may help indicate the nature of this problem.
If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using. My test was performed using version 18.1.20181.177 in Infragistics for Windows Forms 2018.1.
If the project does show the product feature working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
Please let me know if you have any other questions or concerns on this matter.
UltraGridDropDownValidateValueTest.zip