Hi,
How can I add a new row to the ultra grid which is already bound with a datatable.
I need to create a row by hitting the tab at the end of the row or enter key.
Thanks in advance.
Regards,
Arun
Hi Arun,
The easiest thing to do would be to use the AllowAddNew property on the grid.DisplayLayout.Override. You could set it to TemplateOnBottom and that would give the user an AddNewRow that they could simply tab into.
If that's no good for your application, then you would have to somehow trap the Tab/Enter key (using KeyDown or maybe KeyPress on the grid) and try to detect if the focus is on the last row or last cell and then call the AddNew method on the band and then set the ActiveCell to a cell in the new row and use PerformAction to put that cell into edit mode.
Hi Mike,
The above suggestion was provided by you.
Could u suggest me how to do this ?
This isn't working for me. I have a AllowAddNew set to TemplateOnBottom and when my collection is empty the grid ignores the Tab. If I init the collection with at least one item (one row + the addrow) then the grid accepts the Tab and enters the grid from the previous control.
Why is the Tab not working when the grid only has an AddRow?
Any help is appreciated.
thanks
-ken