Hi
I read a recent post regarding CellListChange and CellListSelect. But it didn't solve my problem.
I have a drop down list in a grid (different contents on each row.) When the user selects a value from the list it should immediately fire an event that I can use to derive a value to place in another cell on the same row. E.g. select a drug and calculate the correct dose for the given patient...
What event do I look for - both CellListChange and CellListSelect will not fire until the focus switches to a different row or an object not on the grid.
Any ideas?
Thanks
Jerry
Use RowInitialize. This way you'll also cover the initial binding, not only selection by user.
If you want to fire this event when the user select and not wait for the focus losing, write this:
{
PerformAction(UltraGridAction.ExitEditMode);
}
Another option would be to use the CellChange event. This is better than AfterCellListCloseUp because this event will fire if the user types into the cell or uses the keyboard to select a value without dropping down and closing up the list.
Mike/Amiram thanks for your help.
Mike, seems I have another problem looming from your comment. How do I prevent a user typing anything new - i.e. they should only be able to select from the existing list?
Regards
You can set the column style to DropDownList so they can't type.
But you still need to use CellChange and not AfterCellListCloseUp, because the user can change the value of the cell via the keyboard without dropping down the list.
OK, thanks guys. Changed to CellChange.