I have a webdatagrid with composite keys. I added a dropdownprovider for one of the primary keys.
The problem is that the changes don't persist to the database. I know that this only happens with a primary key field and not any other as I've tested it on other non-key fields and it works fine.
This is either an infragistics bug or it was built in on purpose. Either way, does anyone know of a workaround (if there is one)?
Any help is much appreciated.
I tried to cancel the row updating event but am getting the same error (can't find record by key).
This is the code I wrote to cancel updating: e.cancel = true
Hi,
If you are able to update the row on your own, you could set AutoCrud of Editing Core to false. This would require you to handle all updating, including editing of other columns, and also adding and deleting rows if you have those behaviors on. Another option might be to just cancel the row updating event if you are going to update that column on your own.
-Dave
Actually the work around is not that good after all. Every once in a while I get an infragistics error saying "record cannot be found by key". I would imagine this is because it's trying to update the record on it's own (which doesn't work as I've explained) but can't find it since I change the key in the rowupdating event.
I'm at your mercy.
AgentD,
you're correct, upon testing I realized that I'm not able to commit changes with other editor providers either.
No, there are no restrictions in the database. In fact, I was able to update the database in the rowupdating event through a table adapter located in a xsd.
I, guess my workaround is good enough (table adapter in rowupdating event). However, I was wondering if there is straight forward way of doing this through the webdatagrid.
Thanks in advacne.
Hi boruchsiper,
Are you able to edit the field if you use another editor provider aside from the drop down? Also, are you sure that your database is set up to allow editing of those fields?
regards,David Young