I have an UltraGrid that is bound to a collection, but, for some reason, the cells in the grid will not accept keyboard input. The cells will go into edit mode, and I can move the cursor around within the cells using the arrow keys, but when I type any text or numeric keysroke, the keystroke seems to be ignored. I have other grids in my app that accept keyboard input just fine. Not sure why this one is being difficult!!
For the ediatble cells, I have set the following:
Activation = Activation.AllowEdit
CellClickAction = CellClickAction.EditAndSelectText
There must be something I am overlooking. If anyone can think of anything off the top of their head, I'd appreciate hearing it.
Thanks!!!
Hm, that's odd. I can't see why that would make a difference. The grid can't possible know that the collection is being returned by some parent object. The object itself must be doing something differently.
Was the collection before returned as a different type than the actual object? Like perhaps Object.Collection returns an ICollection instead of an actual Collection?
It appears that my problem was with the data source.
The problem was not that the data source was read-only, but that the data source was a collection object that was a child of another object. As far as I can tell, the fact that the collection was a child object is what prevented it from being bound correctly.
This doesn't work: ultraGrid.DataSource = Object.Collection;
Only this will work: ultraGrid.DataSource = Collection;
Hopefully, this helps someone else at some point in the future!
Thanks for the input, Mike. I have spent hours trying to figure this one out, so any help at all is appreciated!
Well, it's possible that your data source is not allowing editing. If the data source is read-only, then the grid will not allow editing.
If that's not the case, then it must be some property of the grid. This KB article describes all the way in which grid cells might be disabled, so you can check these properties and see if you are setting any of them - or maybe loading a layout into the grid that has some of them set.
HOWTO:How can I make a grid or a column, row, or cell in the UltraWinGrid disabled or read-only?