Persistence Manager cannot find control in radgrid

2 posts, 0 answers
  1. Wired_Nerve
    Wired_Nerve avatar
    163 posts
    Member since:
    Oct 2007

    Posted 06 Nov 2013 Link to this post

    I have a dynamically generated radgrid.
    I am adding combo boxes to the header row from the server during the item created event for the grid.

    I tried adding the combobox to the persistence manager via the code behind.  
    But when the page tries to save or load the selections in comboboxes inside the radgrids header I get the following error:
    RadPersistanceManager could not find control with ID 'ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column0', referenced by the persistence setting.

    I would think this is just a simple setting I have to change or such.. Any suggestions?

    <telerik:RadPersistenceManager ID="RadPersistenceManager1" runat="server"></telerik:RadPersistenceManager>
       <asp:HiddenField runat="server" ID="SessionID" />

    The RadGrid
    <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated" Style="margin-top: 0px" AllowSorting="True">
               <ClientSettings>
                   <Scrolling AllowScroll="True" UseStaticHeaders="True" />
               </ClientSettings>
               <MasterTableView>
                   <RowIndicatorColumn Visible="False">
                   </RowIndicatorColumn>
                   <ExpandCollapseColumn Created="True">
                   </ExpandCollapseColumn>
                   <HeaderStyle HorizontalAlign="Center" />
               </MasterTableView>
           </telerik:RadGrid>

    The method that adds the comboboxes to the header row

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
          {
              if (e.Item is GridHeaderItem)
              {
                  GridHeaderItem item = e.Item as GridHeaderItem;
                  var columnName = "Column";
                  var columnCount = 0;
                  foreach (GridColumn col in RadGrid1.MasterTableView.AutoGeneratedColumns)
                  {
                      RadComboBox radCombo = new RadComboBox();
                      // radCombo.ClientIDMode = ClientIDMode.Static;
                      radCombo.ID = "Column" + columnCount;
                      radCombo.EmptyMessage = "Select Field";
     
                      //Need to get fields and etc,then loop and add
                      var receiveByTagsFields = GetReceiveByTagFields(Convert.ToInt32(PurchaseShipmentUid));
                      foreach (var field in receiveByTagsFields.ReceiveByTagImportFields.OrderBy(x => x.Label))
                      {
                          RadComboBoxItem CBitem = new RadComboBoxItem();
                          CBitem.ClientIDMode = ClientIDMode.AutoID;
                          CBitem.Text = field.Label;
                          CBitem.Value = field.Id.ToString();
                          radCombo.Items.Add(CBitem);
                      }
     
                      if (receiveByTagsFields.MetaFields.Count() != 0)
                      {
                          foreach (var field in receiveByTagsFields.MetaFields.OrderBy(x => x.Label))
                          {
                              RadComboBoxItem CBitem = new RadComboBoxItem();
                              CBitem.ClientIDMode = ClientIDMode.AutoID;
                              CBitem.Text = field.Label;
                              CBitem.Value = field.InventoryMetaUid.ToString();
                              radCombo.Items.Add(CBitem);
                          }
                      }
     
                      LinkButton link = new LinkButton();
                      link.ClientIDMode = ClientIDMode.AutoID;
                      link.Text = "Edit";
                      LiteralControl br = new LiteralControl("<br />");
                      if (col.ColumnType == "GridBoundColumn" || col.ColumnType == "GridNumericColumn")
                      {
                          item[col.UniqueName].Controls.Add(br);
                          item[col.UniqueName].Controls.Add(radCombo);
                      }
                      radCombo.Items.Add(new RadComboBoxItem("Do not import", "-1"));
                      RadPersistenceManager1.PersistenceSettings.AddSetting(radCombo.ClientID);
                      columnCount++;
     
                  }
              }
          }

    This method will validate and load settings if they are already in the system

    protected void ValidateButton_Click(object sender, EventArgs e)
         {
             try
             {
     
     
                 SessionID.Value = Guid.NewGuid().ToString();
     
                 RadPersistenceManager1.StorageProviderKey = SessionID.Value;
                 RadPersistenceManager1.SaveState();
     
     
     
                 int columnCount = RadGrid1.MasterTableView.RenderColumns.Count() - 2;
     
                 List<ValueName> selectedOptions = new List<ValueName>();
                 GridItem[] headers = RadGrid1.MasterTableView.GetItems(GridItemType.Header);
     
                 for (int i = 0; i < columnCount; i++)
                 {
                     string columnName = String.Format("Column{0}", i);
                     RadComboBox columnComboBox = headers[0].FindControl(columnName) as RadComboBox;
                     string selectedText = string.Empty;
                     if (columnComboBox != null)
                     {
                         var selected = columnComboBox.SelectedValue;
                         if (columnComboBox.SelectedItem != null)
                         {
                             selectedText = columnComboBox.SelectedItem.Text;
                         }
     
     
                         selectedOptions.Add(new ValueName() { Name = selectedText, Value = selected });
                     }
                 }
     
                 var grouped = from opt in selectedOptions group opt by opt.Value;
     
                 foreach (var VARIABLE in grouped)
                 {
                     if (VARIABLE.Count() > 1)
                     {
                         if (VARIABLE.Key.ToString() == "")
                         {
                             // Report back to the user they MUST select a valid column mapping or set it to ignore.
                             Literal literal = new Literal();
                             literal.Text =
                                 "<span class='redtext'>Each column must be unique and have either a column type selected or ignore.</span>";
                             ValidationPlaceHolder.Controls.Add(literal);
                             linkButtonSetAllToDoNotImport.Visible = true;
                             break;
                         }
                         if (VARIABLE.Key.ToString() != "-1")
                         {
                             foreach (var valueName in VARIABLE)
                             {
                                 Literal literal = new Literal();
                                 literal.Text =
                                    String.Format("<span class='RedText Bold'>Column Error:</span><span class='RedText'> Duplicate </span><span class='RedText Bold'>{0}</span><span class='RedText'> column labels are being used.</span>", valueName.Name);
                                 ValidationPlaceHolder.Controls.Add(literal);
                                 break;
                             }
     
                             linkButtonSetAllToDoNotImport.Visible = true;
                             break;
                         }
                     }
                 }
             }
             catch (Exception)
             {
     
                 throw;
             }
     
     
     
     
     
         }


    Here is the rendered HTML Code via Google Inspect Element...
    <div class="AfterBorderRow">
            <div style="text-align: right; margin-top: 5px;">
                  
                <span id="ctl00_ContentPlaceHolder1_ValidateButton" class="RadButton RadButton_Default rbSkinnedButton" tabindex="0"><input class="rbDecorated" type="submit" name="ctl00$ContentPlaceHolder1$ValidateButton" id="ctl00_ContentPlaceHolder1_ValidateButton_input" value="Validate" tabindex="-1"><input id="ctl00_ContentPlaceHolder1_ValidateButton_ClientState" name="ctl00_ContentPlaceHolder1_ValidateButton_ClientState" type="hidden" autocomplete="off"></span>
                 <span id="ctl00_ContentPlaceHolder1_FinishButton" class="RadButton RadButton_Default rbSkinnedButton rbDisabled" disabled="disabled" tabindex="0"><input class="rbDecorated" type="submit" name="ctl00$ContentPlaceHolder1$FinishButton" id="ctl00_ContentPlaceHolder1_FinishButton_input" value="Finish" disabled="disabled" tabindex="-1"><input id="ctl00_ContentPlaceHolder1_FinishButton_ClientState" name="ctl00_ContentPlaceHolder1_FinishButton_ClientState" type="hidden" autocomplete="off"></span>
            </div>
            <input type="hidden" name="ctl00$ContentPlaceHolder1$ShowGridArea" id="ctl00_ContentPlaceHolder1_ShowGridArea" value="false">
            <br>
            <div id="ctl00_ContentPlaceHolder1_RadGrid1" class="RadGrid RadGrid_Default" style="margin-top: 0px" tabindex="0">
     
    <table class="rgMasterTable rgClipCells" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_TopPager" style="width:100%;table-layout:auto;overflow:hidden;empty-cells:show;">
        <thead>
            <tr class="rgCommandRow">
                <td class="rgCommandCell" colspan="5"><table class="rgCommandTable" summary="Command item for additional functionalities for the grid like adding a new record and exporting." style="width:100%;">
                    <caption>
                        <span style="display: none">Command item</span>
                    </caption><thead>
                        <tr>
                            <th scope="col"></th>
                        </tr>
                    </thead><tbody>
                        <tr>
                            <td align="left"><input type="submit" name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$AddNewRecordButton" value=" " id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_AddNewRecordButton" title=" Add Record" class="rgAdd"><a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_InitInsertButton" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$InitInsertButton','')"> Add Record</a></td><td align="right"><input type="submit" name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$RefreshButton" value=" " id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_RefreshButton" title=" Refresh" class="rgRefresh"><a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_RebindGridButton" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$RebindGridButton','')"> Refresh</a></td>
                        </tr>
                    </tbody>
                </table></td>
            </tr>
        </thead><tbody style="display:none;"><tr><td></td></tr></tbody>
    </table><div class="rgHeaderWrapper"><div id="ctl00_ContentPlaceHolder1_RadGrid1_GridHeader" class="rgHeaderDiv" style="overflow: hidden; margin-right: 17px;">
     
    <table class="rgMasterTable rgClipCells rgClipCells" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_Header" style="width: 100%; table-layout: fixed; overflow: hidden; empty-cells: show;">
        <colgroup>
            <col style="width: 374px;">
            <col style="width: 176px;">
            <col style="width: 176px;">
            <col style="width: 176px;">
            <col style="width: 176px;">
        </colgroup>
    <thead>
            <tr>
                <th scope="col" class="rgHeader" style="text-align: center; height: 0px;"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$ctl00','')">Class</a><br><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column0" class="RadComboBox RadComboBox_Default" style="width:160px;white-space:normal;">
                    <table summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
                        <tbody><tr class="rcbReadOnly">
                            <td class="rcbInputCell rcbInputCellLeft" style="width:100%;"><input name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$Column0" type="text" class="rcbInput radPreventDecorate rcbEmptyMessage" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column0_Input" value="Select Field" readonly="readonly" autocomplete="off"></td><td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column0_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
                        </tr>
                    </tbody></table><div class="rcbSlide" style="z-index:6000;"><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column0_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display:none;"><div class="rcbScroll rcbWidth" style="width:100%;"><ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;"><li class="rcbItem">Room</li><li class="rcbItem">Serial</li><li class="rcbItem">Status</li><li class="rcbItem">Tag</li><li class="rcbItem">Asset Tag</li><li class="rcbItem">FAID</li><li class="rcbItem">In Service</li><li class="rcbItem">Do not import</li></ul></div></div></div><input id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column0_ClientState" name="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column0_ClientState" type="hidden" autocomplete="off">
                </div></th><th scope="col" class="rgHeader" style="text-align: center; height: 0px;"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$ctl01','')">Column1</a><br><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column1" class="RadComboBox RadComboBox_Default" style="width:160px;white-space:normal;">
                    <table summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
                        <tbody><tr class="rcbReadOnly">
                            <td class="rcbInputCell rcbInputCellLeft" style="width:100%;"><input name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$Column1" type="text" class="rcbInput radPreventDecorate rcbEmptyMessage" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column1_Input" value="Select Field" readonly="readonly" autocomplete="off"></td><td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column1_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
                        </tr>
                    </tbody></table><div class="rcbSlide" style="z-index:6000;"><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column1_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display:none;"><div class="rcbScroll rcbWidth" style="width:100%;"><ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;"><li class="rcbItem">Room</li><li class="rcbItem">Serial</li><li class="rcbItem">Status</li><li class="rcbItem">Tag</li><li class="rcbItem">Asset Tag</li><li class="rcbItem">FAID</li><li class="rcbItem">In Service</li><li class="rcbItem">Do not import</li></ul></div></div></div><input id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column1_ClientState" name="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column1_ClientState" type="hidden" autocomplete="off">
                </div></th><th scope="col" class="rgHeader" style="text-align: center; height: 0px;"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$ctl02','')">Type</a><br><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column2" class="RadComboBox RadComboBox_Default" style="width:160px;white-space:normal;">
                    <table summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
                        <tbody><tr class="rcbReadOnly">
                            <td class="rcbInputCell rcbInputCellLeft" style="width:100%;"><input name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$Column2" type="text" class="rcbInput radPreventDecorate rcbEmptyMessage" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column2_Input" value="Select Field" readonly="readonly" autocomplete="off"></td><td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column2_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
                        </tr>
                    </tbody></table><div class="rcbSlide" style="z-index:6000;"><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column2_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display:none;"><div class="rcbScroll rcbWidth" style="width:100%;"><ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;"><li class="rcbItem">Room</li><li class="rcbItem">Serial</li><li class="rcbItem">Status</li><li class="rcbItem">Tag</li><li class="rcbItem">Asset Tag</li><li class="rcbItem">FAID</li><li class="rcbItem">In Service</li><li class="rcbItem">Do not import</li></ul></div></div></div><input id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column2_ClientState" name="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column2_ClientState" type="hidden" autocomplete="off">
                </div></th><th scope="col" class="rgHeader" style="text-align: center; height: 0px;"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$ctl03','')">Description</a><br><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column3" class="RadComboBox RadComboBox_Default" style="width:160px;white-space:normal;">
                    <table summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
                        <tbody><tr class="rcbReadOnly">
                            <td class="rcbInputCell rcbInputCellLeft" style="width:100%;"><input name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$Column3" type="text" class="rcbInput radPreventDecorate rcbEmptyMessage" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column3_Input" value="Select Field" readonly="readonly" autocomplete="off"></td><td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column3_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
                        </tr>
                    </tbody></table><div class="rcbSlide" style="z-index:6000;"><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column3_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display:none;"><div class="rcbScroll rcbWidth" style="width:100%;"><ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;"><li class="rcbItem">Room</li><li class="rcbItem">Serial</li><li class="rcbItem">Status</li><li class="rcbItem">Tag</li><li class="rcbItem">Asset Tag</li><li class="rcbItem">FAID</li><li class="rcbItem">In Service</li><li class="rcbItem">Do not import</li></ul></div></div></div><input id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column3_ClientState" name="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column3_ClientState" type="hidden" autocomplete="off">
                </div></th><th scope="col" class="rgHeader" style="text-align: center; height: 0px;"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$ctl04','')">Score</a><br><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column4" class="RadComboBox RadComboBox_Default" style="width:160px;white-space:normal;">
                    <table summary="combobox" style="border-width:0;border-collapse:collapse;width:100%">
                        <tbody><tr class="rcbReadOnly">
                            <td class="rcbInputCell rcbInputCellLeft" style="width:100%;"><input name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl01$Column4" type="text" class="rcbInput radPreventDecorate rcbEmptyMessage" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column4_Input" value="Select Field" readonly="readonly" autocomplete="off"></td><td class="rcbArrowCell rcbArrowCellRight"><a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column4_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td>
                        </tr>
                    </tbody></table><div class="rcbSlide" style="z-index:6000;"><div id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column4_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="display:none;"><div class="rcbScroll rcbWidth" style="width:100%;"><ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;"><li class="rcbItem">Room</li><li class="rcbItem">Serial</li><li class="rcbItem">Status</li><li class="rcbItem">Tag</li><li class="rcbItem">Asset Tag</li><li class="rcbItem">FAID</li><li class="rcbItem">In Service</li><li class="rcbItem">Do not import</li></ul></div></div></div><input id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column4_ClientState" name="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl01_Column4_ClientState" type="hidden" autocomplete="off">
                </div></th>
            </tr>
        </thead><tbody style="display:none;"><tr><td colspan="5"></td></tr></tbody>
    </table>
     </div></div>
        <div id="ctl00_ContentPlaceHolder1_RadGrid1_GridData" class="rgDataDiv" style="overflow-x:auto;overflow-y:auto;width:100%;height:300px;">
     
    <table class="rgMasterTable rgClipCells rgClipCells" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00" style="width: 100%; table-layout: fixed; overflow: hidden; empty-cells: show;">
        <colgroup>
            <col style="width: 374px;">
            <col style="width: 176px;">
            <col style="width: 176px;">
            <col style="width: 176px;">
            <col style="width: 176px;">
        </colgroup>
    <thead style="display:none;">
            <tr>
                <th scope="col"></th>
            </tr>
        </thead><tbody>
        <tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__0">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW II History</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__1">
            <td> </td><td> </td><td> </td><td> </td><td> </td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__2">
            <td>Advanced Programming in Java</td><td> </td><td>Midterm</td><td> </td><td>0.75</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__3">
            <td>Spanish</td><td> </td><td>Homework</td><td> </td><td>0.5</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__4">
            <td>Theoretical Physics</td><td> </td><td>Homework</td><td> </td><td>0.95</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__5">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW I History</td><td>0.9</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__6">
            <td>Modern French</td><td> </td><td>Homework</td><td>Pages 30 - 41</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__7">
            <td>Composition</td><td> </td><td>Essay</td><td>Persuasion paper</td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__8">
            <td>Mathematics 1</td><td>1</td><td>Homework</td><td>Pages 21 & 26</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__9">
            <td>Mathematics 2</td><td> </td><td>Homework</td><td>Pages 15 & 18</td><td>0.85</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__10">
            <td>Mathematics 1</td><td> </td><td>Homework</td><td>Pages 34 - 36</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__11">
            <td>Mathematics 2</td><td> </td><td>Quiz</td><td> </td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__12">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW II History</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__13">
            <td> </td><td> </td><td> </td><td> </td><td> </td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__14">
            <td>Advanced Programming in Java</td><td> </td><td>Midterm</td><td> </td><td>0.75</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__15">
            <td>Spanish</td><td> </td><td>Homework</td><td> </td><td>0.5</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__16">
            <td>Theoretical Physics</td><td> </td><td>Homework</td><td> </td><td>0.95</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__17">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW I History</td><td>0.9</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__18">
            <td>Modern French</td><td> </td><td>Homework</td><td>Pages 30 - 41</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__19">
            <td>Composition</td><td> </td><td>Essay</td><td>Persuasion paper</td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__20">
            <td>Mathematics 1</td><td>1</td><td>Homework</td><td>Pages 21 & 26</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__21">
            <td>Mathematics 2</td><td> </td><td>Homework</td><td>Pages 15 & 18</td><td>0.85</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__22">
            <td>Mathematics 1</td><td> </td><td>Homework</td><td>Pages 34 - 36</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__23">
            <td>Mathematics 2</td><td> </td><td>Quiz</td><td> </td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__24">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW II History</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__25">
            <td> </td><td> </td><td> </td><td> </td><td> </td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__26">
            <td>Advanced Programming in Java</td><td> </td><td>Midterm</td><td> </td><td>0.75</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__27">
            <td>Spanish</td><td> </td><td>Homework</td><td> </td><td>0.5</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__28">
            <td>Theoretical Physics</td><td> </td><td>Homework</td><td> </td><td>0.95</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__29">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW I History</td><td>0.9</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__30">
            <td>Modern French</td><td> </td><td>Homework</td><td>Pages 30 - 41</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__31">
            <td>Composition</td><td> </td><td>Essay</td><td>Persuasion paper</td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__32">
            <td>Mathematics 1</td><td>1</td><td>Homework</td><td>Pages 21 & 26</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__33">
            <td>Mathematics 2</td><td> </td><td>Homework</td><td>Pages 15 & 18</td><td>0.85</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__34">
            <td>Mathematics 1</td><td> </td><td>Homework</td><td>Pages 34 - 36</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__35">
            <td>Mathematics 2</td><td> </td><td>Quiz</td><td> </td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__36">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW II History</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__37">
            <td> </td><td> </td><td> </td><td> </td><td> </td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__38">
            <td>Advanced Programming in Java</td><td> </td><td>Midterm</td><td> </td><td>0.75</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__39">
            <td>Spanish</td><td> </td><td>Homework</td><td> </td><td>0.5</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__40">
            <td>Theoretical Physics</td><td> </td><td>Homework</td><td> </td><td>0.95</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__41">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW I History</td><td>0.9</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__42">
            <td>Modern French</td><td> </td><td>Homework</td><td>Pages 30 - 41</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__43">
            <td>Composition</td><td> </td><td>Essay</td><td>Persuasion paper</td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__44">
            <td>Mathematics 1</td><td>1</td><td>Homework</td><td>Pages 21 & 26</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__45">
            <td>Mathematics 2</td><td> </td><td>Homework</td><td>Pages 15 & 18</td><td>0.85</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__46">
            <td>Mathematics 1</td><td> </td><td>Homework</td><td>Pages 34 - 36</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__47">
            <td>Mathematics 2</td><td> </td><td>Quiz</td><td> </td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__48">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW II History</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__49">
            <td> </td><td> </td><td> </td><td> </td><td> </td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__50">
            <td>Advanced Programming in Java</td><td> </td><td>Midterm</td><td> </td><td>0.75</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__51">
            <td>Spanish</td><td> </td><td>Homework</td><td> </td><td>0.5</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__52">
            <td>Theoretical Physics</td><td> </td><td>Homework</td><td> </td><td>0.95</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__53">
            <td>Modern French</td><td> </td><td>Homework</td><td>WW I History</td><td>0.9</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__54">
            <td>Modern French</td><td> </td><td>Homework</td><td>Pages 30 - 41</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__55">
            <td>Composition</td><td> </td><td>Essay</td><td>Persuasion paper</td><td>0.95</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__56">
            <td>Mathematics 1</td><td>1</td><td>Homework</td><td>Pages 21 & 26</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__57">
            <td>Mathematics 2</td><td> </td><td>Homework</td><td>Pages 15 & 18</td><td>0.85</td>
        </tr><tr class="rgRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__58">
            <td>Mathematics 1</td><td> </td><td>Homework</td><td>Pages 34 - 36</td><td>0.8</td>
        </tr><tr class="rgAltRow" id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00__59">
            <td>Mathematics 2</td><td> </td><td>Quiz</td><td> </td><td>0.95</td>
        </tr>
        </tbody>
     
    </table>    </div>
    <input id="ctl00_ContentPlaceHolder1_RadGrid1_ClientState" name="ctl00_ContentPlaceHolder1_RadGrid1_ClientState" type="hidden" autocomplete="off">
        </div>
     
             
        </div>
  2. Kostadin
    Admin
    Kostadin avatar
    1708 posts

    Posted 11 Nov 2013 Link to this post

    Hi Warren,

    I assume that the issue is related with the way you are adding the ComboBoxes to your page. Keep in mind that adding them so late in the page live cycle causes the PersistenceFramework to throw an exception. I would recommend you to use a template columns and add the ComboBox controls in the their HeaderTemplate. You could review the following help article which describes how to create such columns programmatically.

    Regards,
    Kostadin
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top