|
Rank: Newbie Groups: Member
Joined: 1/25/2008 Posts: 3
|
I use your example “CheckBox Column” that lets you delete item of the grid. I would like to know how to delete these items also in my database. To remove the items I need two keys that are not displayed in the grid, I can put them in a non-visible or not ?
- JL
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi Joffrey, The Grid can store one non-visible KeyField for you: http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.Grid.KeyField.htmlIf you need two, you can create a computed field based on those two fields in your SQL statement, using something like "SELECT KEY_FIELD1 + KEY_FIELD2 as KEY_FIELD, ....". Thanks
|
|
Rank: Newbie Groups: Member
Joined: 1/25/2008 Posts: 3
|
Hello,
Thank you very much for your answer. Now I use a single key but I can’t recover it for the line that I want. This is my code:
protected void Button1_Click(object sender, EventArgs e) { foreach (GridItem item in this.Grid1.DeletedItems) { // The key of item is ??? } }
It’s possible to recover the key of “item” that I want ?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi Joffrey,
Please check the reference page in my previous page. The same contents are also available as a .chm file on your local machine. It's explained quite clear there!
Thanks
|
|