Does Telerik wrap my div in its own div? When I set my div visible to false, my div is gone, but the telerik generated div ctl00_ctl00_dvMyDivPanel remains and causes white space issues. There is no white space issue when I remove dvMyDiv from the UpdatedControls. It would be nice if Telerik would collapse the white space or not display its wrapper div when my div is not there.
<telerik:AjaxSetting AjaxControlID="MyBigControl">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="dvMyDiv" />
</UpdatedControls>
</telerik:AjaxSetting>

protected void RadGridQuestions_ItemCreated(object sender, GridItemEventArgs e) { if ((e.Item is GridEditFormItem || e.Item is GridEditFormInsertItem) && e.Item.IsInEditMode) { if (e.Item.OwnerTableView.Columns.FindByUniqueNameSafe("Test_Type_Id") == null) return; RadComboBox ddlTestType = (e.Item as GridEditableItem)["Test_Type_Id"].Controls[0] as RadComboBox; // Attach SelectedIndexChanged event for the dropdownlist control ddlTestType.AutoPostBack = true; ddlTestType.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(TestTypeOfQuestion_SelectedIndexChanged); TestTypeOfQuestion_SelectedIndexChanged(ddlSubObjective, null); ddlTestType.PreRender += new EventHandler(ddlTestType_PreRender); } } private void ddlTestType_PreRender(object sender, EventArgs e) { TestTypeOfQuestion_SelectedIndexChanged(sender, null); } /// <summary> /// Changed test type so update objective and sub objective only relevant for that exam type /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TestTypeOfQuestion_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) { // First reference the edited grid item through the NamingContainer attribute GridEditableItem editedItem = (sender as RadComboBox).NamingContainer as GridEditableItem; // The dropdown list will be the first control in the Controls collection of the corresponding cell string strTestTypeId = (editedItem["Test_Type_Id"].Controls[0] as RadComboBox).SelectedValue; if (string.IsNullOrEmpty(strTestTypeId)) return; RadComboBox ddlKeyElement = editedItem["Question_Category_Id"].Controls[0] as RadComboBox; SqlDataSourceQuestionCatLookupEdit.SelectParameters["Test_Type_Id"].DefaultValue = strTestTypeId; ddlKeyElement.ClearSelection(); ddlKeyElement.DataSource = SqlDataSourceQuestionCatLookupEdit; ddlKeyElement.DataBind(); RadComboBox ddlObjective = editedItem["Objective_Id"].Controls[0] as RadComboBox; SqlDataSourceObjectiveLookupEdit.SelectParameters["Test_Type_Id"].DefaultValue = strTestTypeId; ddlObjective.ClearSelection(); ddlObjective.DataSource = SqlDataSourceObjectiveLookupEdit; ddlObjective.DataBind(); RadComboBox ddlSubObjective = editedItem["Sub_Objective_Id"].Controls[0] as RadComboBox; SqlDataSourceSubObjectiveLookupEdit.SelectParameters["Test_Type_Id"].DefaultValue = strTestTypeId; ddlSubObjective.ClearSelection(); ddlSubObjective.DataSource = SqlDataSourceSubObjectiveLookupEdit; ddlSubObjective.DataBind(); }<div class="rsContentScrollArea" style="position: relative; overflow-y: scroll; width: 1529px; height: 700px; overflow: auto;" _events="[object Object]" sizcache="25" sizset="0">I keep getting the dredded "Conversion from type 'DBNull' to type 'Boolean' is not valid." error and cannot seem to get around it.
I was getting it when I clicked on Add new record and worked around that by adding default values in code behind:
If (e.CommandName = Telerik.Web.UI.RadGrid.InitInsertCommandName) Then 'cancel the default operation e.Canceled = True 'Prepare an IDictionary with the predefined values Dim newValues As System.Collections.Specialized.ListDictionary = New System.Collections.Specialized.ListDictionary() 'set default checked state for checkbox inside the EditItemTemplate newValues("Is_Admin") = False newValues("Is_Disabled") = False 'Insert the item and rebind e.Item.OwnerTableView.InsertItem(newValues) End If