jQuery UI Widgets › Forums › Grid › customize batch edit
Tagged: batchedit
This topic contains 3 replies, has 2 voices, and was last updated by admin 4 months, 3 weeks ago.
-
Authorcustomize batch edit Posts
-
I did not want to open a topic for each question in order not to tire you.
1.I want to use batch edit.when I press enter in a cell I want it to move to the cell on the right and when I press enter in the last cell I want it to understand that this is the last cell and create a dynamic empty row at the bottom and focus on the first cell.I think I need to do this with handlekeyboardnavigation.
2.I need to send only the updated or newly added rows to the db with ajax in bulk, not all rows. How can I get these rows from the grid as an array?
3.How can I use the enter key instead of the mouse to enter batch edit while navigating the grid with the keyboard?
4.When using batch dit, I want to use autocomplete in a cell, that is, how can I make an ajax call when typing a few letters?
5. to get back after updating the row. is there a feature that keeps the old information of the row?
6.finally, I am using a nested grid, is it possible to have a sub-grid belonging to the sub-grid I want to make?
Thank you very muchHi Serdar,
Regarding your questions:
1. If you would like to move to the cell on the right, the ‘tab’ key should be pressed. Enter key will go to the cell below, just like in Excel.
2. You can use the source object’s addrow, updaterow and deleterow callback functions to get information about which row is added, updated or deleted. For additional details, please check: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-datasources.htm
3. Editing starts when you press F2 or start typing. Alternatively, you can use the ‘handlekeyboardnavigation’ callback function to customize the key handling and call methods such as begincelledit or beginrowedit to start cell or row editing.
4. Such functionality is not built-in. You will need to use a custom solution here. As a getting started step, you will need to use the column’s createeditor callback function and inside it, you write the code to customize the cell editor.
5. No, there is not built-in feature for this. You can use the callbacks from 2. and add this information in array variables.
6. It is possible to have multiple hierarchies. The approach is the same as having a grid with nested grids through the initrowdetails callback function.Best Regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/hi admin thank you for your answers, but one of my questions is not fully explained, I would appreciate it if you read it again.
1.I know the TAB key.but I was asked for a special request.I capture the Enter key in handlekeyboardnavigation.what I want to know is how can I switch to cell x of the row? AND how do I know when I am in the last cell? What I want to do is create a new blank row in the grid and focus on the first cell.
3. I looked for an example about this but I couldn’t find it
thank you- This reply was modified 4 months, 3 weeks ago by Serdar.
Hi Serdar,
var cell = $(“#grid”).jqxGrid(‘getselectedcell’); and then the cell.rowindex and cell.datafield to get the current selected cell’s information.
This information can be used to determine whether the datafield is the last datafield in your columns array.The ‘selectcell’ method can be used to select a cell in the Grid so based on the selected cell and the pressed key, you can add logic to select the cell below, above, previous or next to the selected cell.
In case you need to clear the selection, ‘clearselection’ can be used for this purpose.
Best Regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.