Unable to get selected rows data #11965
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @kevalgw, The way you try to set the selected rows in the igx-grid and then retrieve them is the correct way to do it, but for version 14.x of Ignite UI Angular, as there have been several changes between version 10 and 14. First, the selectedRows property on the igx-grid is not available in version 10.x. It has been introduced in the newer supported versions of Ignite UI Angular. What I can suggest is to use the selectRows() method and select the rows you want in the ngAfterViewInit hook. Second, retrieving the selected rows in version 10.x can be done with the selectedRows() method. In later supported versions, this is done with the selectedRows accessor. Having in mind that igniteui-angular version 10.x is considered retired and is no longer eligible for Developer Support Services, to achieve your requirement and take advantage of all introduced features and enhancements, I would suggest upgrading to the latest version i.e. 14. In addition, I have prepared a small sample demonstrating my suggestion and it could be found here. |
Beta Was this translation helpful? Give feedback.
Hello @kevalgw,
The way you try to set the selected rows in the igx-grid and then retrieve them is the correct way to do it, but for version 14.x of Ignite UI Angular, as there have been several changes between version 10 and 14.
First, the selectedRows property on the igx-grid is not available in version 10.x. It has been introduced in the newer supported versions of Ignite UI Angular. What I can suggest is to use the selectRows() method and select the rows you want in the ngAfterViewInit hook.
Second, retrieving the selected rows in version 10.x can be done with the selectedRows() method. In later supported versions, this is done with the selectedRows accessor.
Having in mind that ignit…