Hi,
I have selected a grid row using mouse click, i want to unselect it programmatically in typescript.
Thanks,
Dayakar.
|
// Button click function
removeSelection() {
var selectedRecords = this.gridObj.getSelectedRowIndexes();
if (selectedRecords.indexOf(2) !== -1) {
// The third row selection is removed
var tr = this.gridObj.getRowByIndex(2);
this.gridObj.selectionModule.addRemoveClassesForRow(tr, false, null, 'e-selectionbackground', 'e-active');
}
} |
The problem with this is that once you remove the selection, you have to then click the row twice if you want to re-select it. I'm trying to do the same thing except with checkbox row selection and after you programmatically remove the selection, the next time you click on it, it fires the deselect event instead of select.
Hi Gabe,
Currently we don’t have built in support to deselect a particular row programmatically. However, we have confirmed the requested requirement as an improvement from our side and logged a feature request for the same as “Provide support to deselect particular row programmatically”. At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technical feasibility, and customer interest. And this feature will be included in any of our upcoming releases.
You can now track the status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.
Feedback Link: https://www.syncfusion.com/feedback/46959/need-to-provide-partial-search-support-for-date-column-in-excel-like-grid-filter
We are moving this thread to solved for now. You can also communicate with us regarding the open features any time using our above Feature Report page or reopen the incident.
Regards,
Joseph I.