Hi!
I have a small issue with my ultragrid. It commits a newly added or modified row to the binded datasource just when the focus leaves the row. I don't like that, so i'm asking : is there a way to force the binding back to datasource at any time ? (when i click my "Save" button)
Thanks!
Thanks Alan!
Worked like a charm !
Thanks Amir also, for it's answer.
Is there a same way to commit the content of a cell without leaving it?
I've tried the ways described by Amir, but i don't know why, it didn't worked...
Hello,
Upon clicking a button the grid will lose focus and the row would be committed at that point unless the button is on a toolbar or menu. Since toolbars and menus don't take focus from the grid would not commit the row even though you have clicked your save button. If your save button is on a toolbar, you can use the following to commit the row:
this.ultraGrid1.PerformAction(UltraGridAction.CommitRow);
Let me know if you have any questions with this matter.
Alan
You can change the UpdateMode to OnCellChangeOrLostFocus.
BTW, I think you don't need to do it for the save button, because your grid loses focus and the default value is OnRowChangeOrLostFocus.