Hello With your WebDataGrid, can you achieve this?
Linking WebDataGrid with a DataTable Navigating the client side WebDataGrid with arrows (up, down, right and left) of the keyboard Once a cell selected, enter text directly then trigger a server-side event as soon as I would have supported either the arrow keys to move to the next cell or with the ENTER key.
In this server-side event, I would have access to: • The cell value • The line number • The number of the column
Thank you very much. It's so easy to do Winform :-(
Hello Olivier,
Thank you for using our community!
I will try to show you that this is achievable easily with the WebDataGrid also.
Below you will find a couple of useful references.
Linking WebDataGrid with a DataTable:
- http://es.infragistics.com/samples/aspnet/data-grid/binding-to-datatable
- http://es.infragistics.com/community/forums/t/81580.aspx
- https://www.youtube.com/watch?v=1blIV17wQ_U
Keyboard navigation (use Activation behavior)
- http://help.infragistics.com/Help/Doc/ASPNET/2015.2/CLR4.0/html/WebDataGrid_Activation.html
- http://es.infragistics.com/community/forums/t/16891.aspx
- http://es.infragistics.com/community/forums/t/38248.aspx
In order to enter text directly when cell is selected or focused, you should se EnableOnActive to true:
<ig:CellEditing Enabled="true"> <EditModeActions EnableF2="true" EnableOnActive="true" MouseClick="Single" /> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="CustomerID" ReadOnly="true" /> </ColumnSettings> <CellEditingClientEvents EnteringEditMode="WebDataGridView_EnteringEditMode" EnteredEditMode="WebDataGridView_EnteredEditMode" ExitedEditMode="WebDataGridView_ExitedEditMode" ExitingEditMode="WebDataGridView_ExitingEditMode" /></ig:CellEditing>
As for the direct submit once the value is changed, Activation behavior will make a postback once you move the focus somewhere else within the grid. Also If you are not using BatchUpdating, a postback will be made immediately after you change the value.
Batch Updating Example - http://es.infragistics.com/samples/aspnet/data-grid/batch-updating
As for the server-side event, RowUpdating will be fired, and you will be able to access only the properties below:
If you want to access the actual cell value and edited cell column, you should handle some client event, like ExitedEditMode for example.
I hope that you will find the information above helpful.
Let me know if I may be of further assistance.