Hello,
I am working with a UltraWinGrid Control. The grid is bound to BindingList Collection which at beginning is empty. I want the user to type in some characters in a cell. Then press Enter and a Dialog is opened with a list that is filtered.
For example: ActiveCell is bound to DeviceSerialNumber and user enters "12" then the popup shows a list of devices containing "12" in the field SerialNumber.
Kind regards
Patrick
Hi Patrick,
Are you sure you want to make the users press Enter? The normal behavior for a dropdown is to show a list of suggestions as the user types. That will be a lot easier to implement and it's easier for the user since they don't have to do anything special to get the list to display.
To do it the way I suggested, all you have to do is attach a ValueList or UltraDropdown to the column and set the AutoCompleteMode to one of the "Suggest" options.
Patrick Jox said:I am starting with an empty grid which allows addnew. So in the addnew row the user enters "12" and <Enter>. The first problem is that the enter key is set to the next row. How can I avoid this? Actually I set it back to my edited row.
You would have to alter the KeyActionMappings collection of the grid and remove the mapping for the Enter key that has an action of CommitRow.
Patrick Jox said:Filtering does not work since UltrGridView.ActiveCell.Text does not return the value in the cell but the value of the bound member. Is there another property which returns the correct value?
I'm not sure what you mean by this. What you are saying here is exactly the opposite of how the grid works. The Text property of a cell will return what you see on the screen and it's the Value property that is not updated until you leave the cell.
Patrick Jox said:Is there a method to find out if the grid is in Addnew Mode afte´r having pressed <Enter>
There's a property on row for IsAddRow and also IsTemplateAddRow.
Patrick Jox said:My bound object is a complexe type with other Elements in say I have a position where I want to select the device only for infomation. The grid shows the expand icon in in front of the first column. I don't want the row to be expandable
I'm not sure I understand exactly what you are asking here, but it sounds like you want to set:
grid.DisplayLayout.ViewStyle = ViewStyle.SingleBand;
Mike,
Thanks for this. It helped me to achieve what I need. But I want to make the application more comfortable for the user so I would like to diable the enter behaviour only for two column? I think, this can't be done. right?
So I have to implement the move right after the user selected an Item from dialog manually. Is this done using activecell or do you have any prepared functions for this?
Regards