|
Rank: Member Groups: Member
Joined: 5/10/2009 Posts: 16
|
Since I don't deal with recordsets or datareaders I want to populate a grid in an easy way by adding rows and/or cell values one for one. So it doesn't need to be databound at all. I suggest this must be possible but I can't find a method or example in the documentation while I expected this to be a basic feature. Please help.
regards, Oscar
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, I believe you can call do something like this:
Code: C#
EO.Web.GridItem newItem = grid1.CreateItem();
grid1.Items.Add(newItem);
newItem.Cells[0].Value = "something";
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/10/2009 Posts: 16
|
Hi eo_support,
that works, thank you very much!
Any idea whether it's possible to add a row woth cell values in one action instead of each cell individually?
How can I get the grid directly editable after a row has been added in this way?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can either set value with data binding or with code. If you do it with code, you must set each cell individually.
For the second question, you can set the Grid's EditItemIndex and EditCellIndex.
Thanks!
|
|