Two properties of an object displayed in the Ultragrid are PartId and PartDescription.
One column in the UltraGrid is a dropdown containing a ValueList. It is composed of a collection of ValueListItems (dataValue(PartId) and displayText(PartDescription).
I attached the ValueList to the PartDescription column in the grid. The PartId column is hidden.
After making a selection from the dropdown at run-time, the underlying object has the PartDescription set to the dataValue of the ValueListItem. The PartId is null.
How can I correct this, so the DataValue property is assigned to PartId and the DisplayText property is assigned to PartDescription?
Hello Lars,
We are still following this forum thread.
Please feel free to let us know if you still have any questions on this matter.
Thank you for your feedback.
The value of the cell does not change before the cell exits edit mode. While the user selects values from the combo, with the mouse or via the keyboard, only the text of the cell is changing.
In order to get the possible value the user tries to set, before the cell exits edit mode, you may parse the text of the cell through the value list to a possible value of the cell. To be able to handle most scenarios you may use CellChange event. In this event you can take the current text of the cell and try to get the related value in your value list. More about this event you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v15.1~Infragistics.Win.UltraWinGrid.UltraGrid~CellChange_EV.html
Please note in this scenario if the user is allowed to enter a value that does not exist in the value list you need to handle this and return some default or null value.
Please check the attached sample project implementing this approach and let me know if you need any further assistance on this.
The users of this software want to enter data in the grid without using the mouse. They are "power users". For them to have to use the mouse to ensure that the combo/grid is operating "correctly" slows them down.
The combo is the first column in the grid. After selecting the desired row within the combo, I need to check that the selected value does not exist in any other row within the grid. If it does, I need to tell the user and not allow the row to be created with this value.
Further, the last row is a decimal datatype. I use the selected value of the combo box to lookup the most current unit cost paid for this item in table other than the primary one on which this grid is based.
Thanks for your help.
AfterCellListCloseUp event occurs after a cell’s combo has been closed. This is the case when the user clicks with the mouse in the combo or if she navigate to the cell via the keyboard, clicks shift + down arrow and select value. More about AfterCellListCloseUp event you may find by following the next link http://help.infragistics.com/Help/Doc/WinForms/2015.1/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v15.1~Infragistics.Win.UltraWinGrid.UltraGrid~AfterCellListCloseUp_EV.html Please note when after the combo has been closed only the text of the cell is changed. The value of the cell changes after the cell exits edit mode. This is why I am calling PerformAction method and force the cell to exit edit mode.
However if the user navigates with the keyboard and never drop down the cell’s combo this event will not fire. This is where you may use AfterCellUpdate event. When the user navigates with the keyboard, without dropping down the combo both value and text of the cell are changing.
Please try to explain what you are trying to achieve in your scenario and I will be happy to investigate this further for you.
Yes, it appears that this event, AfterCellListCloseUp, does not fire if the user selects an item in the DropDown cell containting a ValueList via the keyboard, but it does when the mouse is used to select a ValueListItem.
What can I do to make it fire via the keyboard?