Smart UI Components & Libraries – Grid, Scheduler, Gantt, Kanban for Angular, React, Next.js, Vue, Blazor, JavaScript › Forums › Data Grid › Selection in grid Tagged: selection This topic has 6 replies, 3 voices, and was last updated 3 months, 2 weeks ago by admin. Viewing 7 posts - 1 through 7 (of 7 total) Author Posts July 10, 2025 at 8:53 am #112650 tbettinazzi@axioma.itParticipant I use a checkbox selection with multiple selection. How can I get the selected rows indexes ? Tks July 10, 2025 at 9:23 am #112654 MarkovKeymaster Invoke the getSelectedRowIndexes method. const grid = document.querySelector(‘smart-grid’); const result = grid.getSelectedRowIndexes(); Best Regards, Markov Smart UI Team https://www.htmlelements.com/ July 10, 2025 at 9:57 am #112655 tbettinazzi@axioma.itParticipant Tks I found also a metod getSelectedRowIds. Is there the way to declare a column ad id ? Tks July 11, 2025 at 9:16 am #112659 MarkovKeymaster Hi, The column id is the ‘dataField’ property which you set to the columns. Best Regards, Markov Smart UI Team https://www.htmlelements.com/ July 16, 2025 at 8:52 am #112663 tbettinazzi@axioma.itParticipant My data field is defined as {label : ‘Code’, dataField:’CODICE’, width:’auto’, align: ‘center’, width: ‘15%’, visible : true, allowEdit: false}, Shouid I add something to make it the id or I need to add a column named id to my columns ? I also tried to add row.id value to each row but it seems to ignore it. Tks July 16, 2025 at 9:43 am #112664 tbettinazzi@axioma.itParticipant I added an id field named id. I defined in the DataSource keyDataField : ‘id’ I defined it in columns as {label : ‘Id’, dataField:’id’, width:’auto’, align: ‘center’, width: ‘15%’, visible : true, allowEdit: false}, I filled it. but getSelectedRowIds() still returns the row number of the selected rows and not my id. Tks July 17, 2025 at 2:52 pm #112666 adminKeymaster Hi, To set the id of the Grid, set the id property of the dataAdapter object to the dataField you want to be used as an ID. Best Regards, Markov Smart UI Team https://www.htmlelements.com/ Author Posts Viewing 7 posts - 1 through 7 (of 7 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In With Google Log In