updatecommand when grid bind ot a collection list instead of dataset

2 posts, 0 answers
  1. JJ
    JJ avatar
    147 posts
    Member since:
    May 2010

    Posted 14 Sep 2011 Link to this post

    I have a radgrid, bind to a collection list ( a list of data entitis).

    One the grid_update command, GridTextBoxColumnEditor editor = (GridTextBoxColumnEditor)editMan.GetColumnEditor("Notes") returns "specificied argument was out of the range of valid value" error. But Notes is one of the item in my Collection class. Why?

    radgrid update won't work for collection?

    protected void rgDesigLevel_UpdateCommand(object sender, GridCommandEventArgs e)
               switch (e.Item.OwnerTableView.Name)
                   case "Master":
                       string Level1Notes="";
                       CustomerFileHistoryManager cfhm = new CustomerFileHistoryManager();
                       foreach (GridDataItem item in rgDesigLevel.EditItems)
                           Int32 AuditCustomerId = Convert.ToInt32(item.GetDataKeyValue("ID"));
                           GridEditManager editMan = item.EditManager;
                           GridTextBoxColumnEditor editor = (GridTextBoxColumnEditor)editMan.GetColumnEditor("Notes");
                           Level1Notes = editor.TextBoxControl.Text;
                           cfhm.UpdatePreProcNotes(AuditCustomerId, Level1Notes);
  2. Mira
    Mira avatar
    1124 posts

    Posted 19 Sep 2011 Link to this post

    Hello JJ,

    Please make sure that the UniqueName of the corresponding column in the RadGrid is Notes as well.
    You can see how to work with column editors here.

    I hope this helps.

    Best wishes,
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
  3. DevCraft R3 2016 release webinar banner
Back to Top