jQWidgets Forums
jQuery UI Widgets › Forums › Grid › how to select row when selectionmode is 'singlecell'
Tagged: angular 7 data grid, angular 7 grid, jqxGrid ;
This topic contains 6 replies, has 2 voices, and was last updated by Peter Stoev 6 years, 6 months ago.
-
Author
-
As the title, when I set the selection mode to ‘singlecell’, I can’t select the row, so I can’t do the operation of deleting the row data, which is just too unreasonable.
Hi JenkeNg,
singlecell or other cell selection modes are for selecting cells. You can still delete rows by using the deleterow method of jqxGrid.
Best Regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/Hi,Peter Stoev.
I am used to selecting the line first, getting the index of this line, and then performing the delete operation. Now I can’t select this line, so I don’t know what method I should use to delete the specified line. Is there any good advice?
Added: I want to get a function like ‘EXCEL’. It can be used for both cell operations and the line to edit or delete. This seems reasonable. Is there any way? This problem has taken me too much time.
Hi JenkeNg,
getselectedcells Method
The expected selection mode is ‘singlecell’, ‘multiplecells’ or ‘multiplecellsextended’Gets all selected cells. Returns an array of all selected cells. Each cell in the array is an Object with two fields: ‘rowindex’ – the row’s bound index and ‘datafield’ – the column’s datafield.
Parameter Type
None Return Value
Array
Code example
Invoke the getselectedcells method.var cells = $(‘#jqxGrid’).jqxGrid(‘getselectedcells’);
Having the rowindex, you can get the Row’s ID and invoke the deleterow method to delete a Grid row.
Hi JenkeNg,
singlecell or other cell selection modes are for selecting cells. You can still delete rows by using the deleterow method of jqxGrid.
Best Regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/Thank you Peter Stoev.
I know this method you said, but don’t you think it is not intuitive enough? I actually select this cell to delete this line, so it looks silly. You can refer to Excel for cell selection and row selection, and add a selection mode for merge cell selection and row selection. Will this design be improved? In addition, I found another problem. When ‘selectmodel’ is ‘chekbox’ and ‘editmodel’ is ‘selectedrow’, I select this line and click the edit button beginrowedit on the toolbar. This is all right. And when I clicked on the editor to prepare the input value, I immediately triggered endrowedit. I don’t know if this is a bug. These problems are really frustrating.Hi jenkeNg,
We have several selection modes to select cells and several selection modes to select rows. You’re looking exactly for Excel selection mode which we do not have.
Best Regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.