General Category > Help for ParamQuery Pro
DELETE problem
hyh888:
When I select a row in treegrid and press DELETE ,all data in grid are deleted.
When I select a row in grid and press DELETE in common grid, the data in the row(s) are deleted, but the empty row is still there. Is it possible to delete whole row (or rows)?
paramvir:
whole row(s) can be deleted by using deleteNodes or deleteRow API method.
https://paramquery.com/pro/api#method-deleteNodes
https://paramquery.com/pro/api#method-deleteRow
Example: https://paramquery.com/pro/demos -> context row -> Delete Row.
hyh888:
Than you for the help. But I hope pqgrid can fix two problems that I have described . They really make trouble.
paramvir:
Sure thanks for pointing out the issue in treegrid, it would be fixed in upcoming version.
As far as pressing delete key in grid is concerned it's the default behaviour of delete key to clear data in row which can be customized with help of beforeCellKeyDown event.
https://paramquery.com/pro/api#event-beforeCellKeyDown
hyh888:
Maybe this is the best solution now.
When I put some code in beforeCellKeyDown event, it is a little troublesome to get rowIndx list of the rows selected.
Only the last row (in selected rows) can be deleted easily. Is there any easy way to delete all selected rows?
if(event.key=="Delete" ){debugger;
//var Sel = this.Selection().getSelection();//There need be a For Cyclic Sentence to remove the repeated rowindexs.
this.deleteRow({ rowIndx:ui.rowIdx } );
}
Navigation
[0] Message Index
[#] Next page
Go to full version