This is a migrated thread and some comments may be shown as answers.

grid set editmode missing items

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mario
Top achievements
Rank 2
Mario asked on 15 Jul 2010, 06:18 PM
Hi,

i have a page to insert, edit, update my user in the database.
Therefore i use a radgrid with an inform usercontrol for the editform and to insert a new user.
It already worked editing, but it wont work now...

I get an out of range exception, which gets created because of following code:

to get to the editform i call the codebehind via a click event with a "context" radmenu working fine.

radGridUser.Items[pIndex].Edit = true;

the index is correct, but when i watch the radGridUser for the Items the count is always one below the pIndex (the selected griditemindex).

after enabling Item.Edit i just do: radGridUser.Rebind()

which also works fine in all other grids of my websolution.

are there any ideas or known issues?
How is the grid able to loose its items?

Also i watched the RadGridUser_NeedDatasource eventmethod, which gets called correctly befor the grid sets the Items.Edit property.

thx Mario

1 Answer, 1 is accepted

Sort by
0
Mario
Top achievements
Rank 2
answered on 16 Jul 2010, 12:08 PM
i encountered an error in my UserDetail.ascx used as the editform in the grid.
I filled a RadComboBox with 2 items which value had "false" and "true".
The problem was, when i set the selected item with item.isBool.ToString() it generated the string with a upper case letter so it couldn't set one of my RadComboBoxitems with lower case letters at the beginning ....
Tags
Grid
Asked by
Mario
Top achievements
Rank 2
Answers by
Mario
Top achievements
Rank 2
Share this question
or