I'm pretty confident there is no way around this one but going to ask never the less. Again this is not a question for using the grid in a normal way. I have spend a good amount of time trying to figure out how to use a grid without using a primary key. So far so good but I'm reaching a snag here.
I use this to update my data source manually.
this.gridIDMap.dataSource._data[cell.rowIndex][cell.columnKey] = data;
This works on all cells that are not under the primary key column. For example take this grid
123123123
say the last column is my primary key in this case. If I do the following
this.gridIDMap.dataSource._data[0][0] = data;
Everything goes well. but doing this
this.gridIDMap.dataSource._data[2][0] = data;
Gets my an internal error on a var called rec and then the grid is basically broken. Mainly the selection tool no longer works. When you think about it this make perfect sense, who can you be permitted to change a primary key value? So I dont think there is a way around this and hiding a fake primary key causes other issue.
Stamen, yes that has be proposed but for reason I currently hold no interest in remembering, it did not work out.
Hello,
Could you please create a small sample demonstrating how you are handling the updating without PK? Generally speaking there shouldn't be any issues changing the values of the data source records directly. It's probably worth mentioning that having a fictive PK column that's hidden will certainly be less problematic than ignoring the Updating feature entirely when trying to update the grid.
I am looking forward to hearing from you!
Best regards,
Stamen Stoychev
Please note, because these are internal properties, I am unable to provide you with the rec variable path.
Instead, I recommend using your Web Browser development tool to review the call stack and find what function is called when this error occurs. From here, you can perform a search on the JS files that are loaded or download the debug scripts we provide to developers who've registered their version of IgniteUI onto their online Infragistics account.
I hope this helps you.
I understand. What would be the path to the rec var if I wanted to play with that?
Hi Sean,
There may be code used in the ui_igGridSelection script which utilizes the Primary Key to work properly. Depending on the error, you may be able to set the rec variable to prevent the error from occurring.
Please note, Infragistics doesn't support the use of internal properties to enable custom functionality (use of _data property).