Hello,
I have a webdata grid with a rowadding property.
At the top of the grid, I have a "save" button, so when I click this button, I would like to have exactly the same that when I press enter key.
So in other word, when I click on my "save" button, I would like to trigger the server side event "GridSpecBottom_RowAdding" for my grid GridSpecBottom.
Is it possible?
If not, how could I read values in this row?
I have tried
GridSpecBottom.Behaviors.EditingCore.Behaviors.RowAdding.Row.Items[0].Value.ToString()
but it returns null even if I have a data in my cell.
Thanks for your help
Hello Damien,
Do you want this Save button to do the job on the server? If this is not obligatory for you I am suggesting you your save button to be an html input field and to handle its onclick event:
<input type="button" ID="Button1" OnClick="addRow();" Value="Save" />
The addRow method should look something like this:
function addRow() {
var grid = $find("<%=WebDataGrid1.ClientID %>");
grid.get_behaviors().get_editingCore().get_behaviors().get_rowAdding()._commitRow();
}
Regards,
Lyuba Petrova
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hi Lyuba,
No problems for me, the code to save is server side so it is not a problem if I write some js code.
I tested it and it works perfectly!
Thanks very much
Best Regards
Damien