I use ASPxGridView
and EntityDataSource
as its datasource. In EntityDataSource
, I write CommandText, so I can not set "EnableInsert", "EnableUpdate", or "EnableDelete" to true. That's why, I manipulate (insert, update, delete) data manually. Changes are made manually pass through to database. But at the side of the GridView these errors are given:
For inserting: "Insert is disabled for this control."
For updating: "Update is disabled for this control."
For deleting: "Delete is disabled for this control."
How can I solve this problem?
(The reason of using CommandText is where parameters and joining of more than 1 tables for showing in GridView.)
First you must have primary ID in table, and you must have it in form so you can insert it, or ideally, you set incrementing key, and just input values. Then you have to set value property for control. And then it should work.