grid set editmode missing items

2 posts, 0 answers
  1. Mario
    Mario avatar
    75 posts
    Member since:
    Jun 2009

    Posted 15 Jul 2010 Link to this post


    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
  2. Mario
    Mario avatar
    75 posts
    Member since:
    Jun 2009

    Posted 16 Jul 2010 Link to this post

    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 ....
  3. DevCraft R3 2016 release webinar banner
Back to Top