Hi team,
Uisng Igx data grid, i want to get the row data when i click button in another grid. Here id is a primary key. i have already mentioned. Also how can i get Column data?i am not able to access the grid data by using
TS:
Using 9.1.28 version of Infragistics
Hello,
I have been looking into your question and prepared a small sample in order to test the described behavior.
However, since version 9 is considered retired and no longer eligible for Developer Support Services, the provided sample is using the latest version i.e. 16.0.0 and there could be differences in the properties and methods between these versions. Having this in mind, my suggestion is to update to the latest version.
Anyways, what I could say is that on my side everything works as expected and I'm able to get the row data, however, please note that getRowByIndex() accepts as parameter row index i.e. value between 0 and (data.length - 1). If your requirement is to get a specific row by primary key what I could suggest is using the getRowByKey() method.
Regarding your second question about getting the column data, an approach I could suggest is to get the required column via getColumnByVisibleIndex(index: number) or getColumnByName(field: string) and loop through its cells collection in order to get each cell value:
//Get column via getColumnByVisibleIndex() or getColumnByName() this.grid1.getColumnByVisibleIndex(0).cells.forEach((cell) => { console.log(cell.value); });
A small sample could be found here.
Also, a list of all igx-grid properties and methods in version 16 could be found here and for version 9.1.28 here.
Let me know if I may be of any further assistance.
Sincerely,Teodosia HristodorovaSoftware Developer