Hi,
I need the webdatagrid's row updating to work when I press the enter key. It works now when I press the key twice, but I want it to work with single press.
It's working very well for row adding but not for row updating
I tried for some work arounds like editing behaviour's commit. But Commit doesn't trigger me the post back.
However help me find a way to make it work with single enter key press.
Hi Nagaraj,
I tried this in a sample with a presumed settings for the Behaviors of the grid:
<Behaviors> <ig:Activation /> <ig:Selection RowSelectType="Multiple" CellClickAction="Row" /> <ig:EditingCore> <Behaviors> <ig:CellEditing Enabled="true"> <CellEditingClientEvents ExitedEditMode="WebDataGrid1_CellEditing_ExitedEditMode" /> <EditModeActions EnableF2="true" EnableOnActive="true" MouseClick="Single" /> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="Dosage" ReadOnly="true" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors>
and the CellEditing event function:
function WebDataGrid1_CellEditing_ExitedEditMode(sender, eventArgs){ sender.get_behaviors().get_editingCore().commit();}
and that worked fine for me, it's making a request.
Please try out what I have prepared and see if it works for you. If that's what you want and you cannot incorporate it in your project, please do share a sample where I can try and make this work.
I will be waiting for your feedback.
Hi Boris,
Thank you for the help.
It's working fine.
I understand that it doesn't update the row if there are no changes made. But If I try such scenario, the entire row just gets selected and it doesn't get unselected even I select any other row.
How to avoid the row getting selected in such case.
e.g consider there is field called "Description". I click that field and pressing enter without giving any values. The entire row gets selected