aspx page-<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" Skin="MetroTouch"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" > <AjaxSettings> <telerik:AjaxSetting AjaxControlID="rdComboFrameworklist"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="Panel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadTabStrip2"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadTabStrip2"></telerik:AjaxUpdatedControl> <telerik:AjaxUpdatedControl ControlID="Panel1" ></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <%--<script type="text/javascript"> /* <![CDATA[ */ function onTabSelecting(sender, args) { if (args.get_tab().get_pageViewID()) { args.get_tab().set_postBack(false); } } /* ]]> */ </script>--%> <div id="example" style="width:98%; margin:0 auto;"> <div class="demo-content"> <%-- <telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" Skin="MetroTouch" Width="100%" Align="Justify" OnTabClick="RadTabStrip1_TabClick"> </telerik:RadTabStrip> <telerik:RadMultiPage ID="RadMultiPage1" CssClass="RadMultiPage" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated"> </telerik:RadMultiPage>--%> <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" CssClass="div-container no-bg" LoadingPanelID="RadAjaxLoadingPanel1"> <telerik:RadTabStrip ID="RadTabStrip2" Width="100%" Orientation="HorizontalTop" CssClass="RadTabStrip_SkinSlik" OnTabClick="RadTabStrip2_TabClick" runat="server" AutoPostBack="True" > <Tabs> <telerik:RadTab runat="server" Value="0" Text="Perspective Weightings" Selected="true" /> <telerik:RadTab runat="server" Value="1" Text="Rating Model" /> </Tabs> </telerik:RadTabStrip> <asp:Panel ID="Panel1" runat="server" CssClass="multiPage" Width="100%"> </asp:Panel> </telerik:RadAjaxPanel> </div> </div></asp:Content>aspx.cs protected void Page_Load(object sender, EventArgs e) { String ctrlStr = ""; //Load a control on each page load if (ViewState["LoadedControl"] == null) { Control control = LoadControl("~/UserControls/PerspectiveWeightingsControl.ascx"); ctrlStr = "~/UserControls/PerspectiveWeightingsControl.ascx"; //It's important to set it an ID! control.ID = ctrlStr; Panel1.Controls.Add(control); } else { ctrlStr = ViewState["LoadedControl"].ToString(); Control control = LoadControl(ViewState["LoadedControl"].ToString()); //It's important to set it an ID! control.ID = ctrlStr; Panel1.Controls.Add(control); } } protected void RadTabStrip2_TabClick(object sender, RadTabStripEventArgs e) { String ctrlID = null; switch (e.Tab.Value) { case "0": ctrlID = "~/UserControls/PerspectiveWeightingsControl.ascx"; break; case "1": ctrlID = "~/UserControls/SurveyRatingModelControl.ascx"; //The timer is going to start ticking, once its control is loaded //Session["Ticks"] = 0; break; } //Load the corresponding control UserControl control = (UserControl)LoadControl(ctrlID); //It's important to set it an ID! control.ID = ctrlID.Replace('/', '_'); //Clear panel controls and add the newly loaded control Panel1.Controls.Clear(); Panel1.Controls.Add(control); //Save which control is loaded ViewState["LoadedControl"] = ctrlID; } }}------------user control - perspectiveweighting<telerik:RadGrid ID="gridPerspectiveWeighting" AllowPaging="True" PageSize="10" OnNeedDataSource="gridPerspectiveWeighting_NeedDataSource" OnItemCommand="gridPerspectiveWeighting_ItemCommand" OnItemCreated="gridPerspectiveWeighting_ItemCreated" OnDeleteCommand="gridPerspectiveWeighting_DeleteCommand" OnInsertCommand="gridPerspectiveWeighting_InsertCommand" OnUpdateCommand="gridPerspectiveWeighting_UpdateCommand" OnItemDataBound="gridPerspectiveWeighting_ItemDataBound" AllowSorting="true" runat="server"> <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <ExportSettings ExportOnlyData="true" HideStructureColumns="true" OpenInNewWindow="true" IgnorePaging="true"></ExportSettings> <MasterTableView EditMode="InPlace" CommandItemDisplay="Top" CommandItemSettings-ShowRefreshButton="false" DataKeyNames="Id" AutoGenerateColumns="false" InsertItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnFirstPage" > <CommandItemSettings ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true" ShowExportToWordButton="true" /> <Columns> <telerik:GridBoundColumn HeaderText="ID" DataField="Id" ReadOnly="True" UniqueName="Id" Display="False"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="PerspectiveCategoryId" DataField="PerspectiveCategoryId" ReadOnly="True" UniqueName="PerspectiveCategoryId" Display="False"> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="PerspectiveCategoryId" HeaderText="Perspective Category"> <HeaderStyle Width="160px" /> <ItemStyle Width="160px" /> <ItemTemplate> <asp:Label ID="lblPerspectiveCategory" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PerspectiveCategoryName") %>'> </asp:Label> </ItemTemplate> <EditItemTemplate> <telerik:RadDropDownList ID="ddlPerspectiveCategory" ListTextField="PCName" ListValueField="ID" runat="server"></telerik:RadDropDownList> <asp:Label ID="lbleditPerspectiveCategory" runat="server" Text='<%# Eval("PerspectiveCategoryId")%>' Visible="false"></asp:Label> </EditItemTemplate> </telerik:GridTemplateColumn> <%-- <telerik:GridBoundColumn HeaderText="Perspective" ItemStyle-Width="150px" DataField="PerspectiveName" UniqueName="PerspectiveName"> <HeaderStyle Width="150px" /> </telerik:GridBoundColumn>--%> <telerik:GridTemplateColumn HeaderText="Perspective" HeaderStyle-Width="150px" ItemStyle-Width="150px" UniqueName="PerspectiveName" SortExpression="PerspectiveName" DataField="PerspectiveName"> <ItemTemplate> <%# Eval("PerspectiveName") %> </ItemTemplate> <EditItemTemplate> <telerik:RadTextBox ID="txtEditPerspectiveName" runat="server" Width="150px" TextMode="SingleLine" Text=<%# Eval("PerspectiveName") %>></telerik:RadTextBox> </EditItemTemplate> <InsertItemTemplate> <telerik:RadTextBox ID="txtPerspectiveName" runat="server" Width="150px" TextMode="SingleLine" ></telerik:RadTextBox> </InsertItemTemplate> </telerik:GridTemplateColumn> <%-- <telerik:GridBoundColumn HeaderText="Perspective Type" ItemStyle-Width="150px" DataField="PerspectiveType" UniqueName="PerspectiveType"> <HeaderStyle Width="150px" /> </telerik:GridBoundColumn>--%> <telerik:GridTemplateColumn HeaderText="Perspective Code" HeaderStyle-Width="150px" ItemStyle-Width="150px" UniqueName="PerspectiveType" SortExpression="PerspectiveType" DataField="PerspectiveType"> <ItemTemplate> <%# Eval("PerspectiveType") %> </ItemTemplate> <EditItemTemplate> <telerik:RadTextBox ID="txtEditPerspectiveType" runat="server" Width="150px" TextMode="SingleLine" Text=<%# Eval("PerspectiveType") %>></telerik:RadTextBox> </EditItemTemplate> <InsertItemTemplate> <telerik:RadTextBox ID="txtPerspectiveType" runat="server" Width="150px" TextMode="SingleLine" ></telerik:RadTextBox> </InsertItemTemplate> </telerik:GridTemplateColumn> <telerik:GridNumericColumn DataField="Weight" DataFormatString="{0:0}" HtmlEncode="false" HeaderText="Weight" SortExpression="Weight" UniqueName="Weight"> <HeaderStyle Width="150px" /> </telerik:GridNumericColumn> <%--<telerik:GridTemplateColumn UniqueName="Weight" HeaderText="Weight"> <HeaderStyle Width="150px" /> <ItemStyle Width="150px" /> <ItemTemplate> <asp:Label ID="lblWeight" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Weight") %>'> </asp:Label> </ItemTemplate> <EditItemTemplate> <telerik:RadNumericTextBox runat="server" ID="txtWeight" DisplayText='<%# DataBinder.Eval(Container.DataItem, "Weight") %>' DataField="Weight" DataFormatString="{0:0}" HtmlEncode="false" HeaderText="Weight" SortExpression="Weight" UniqueName="Weight"></telerik:RadNumericTextBox> <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Invalid input" ControlToValidate="txtWeight" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator> </EditItemTemplate> </telerik:GridTemplateColumn>--%> <telerik:GridEditCommandColumn UniqueName="EditColumn" ButtonType="ImageButton" HeaderText="Edit"> <HeaderStyle Width="70px" /> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn ConfirmText="Delete this Item?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" HeaderText="Delete"> <HeaderStyle Width="70px" /> </telerik:GridButtonColumn> </Columns> </MasterTableView></telerik:RadGrid> <table style="height:30px;"> <tr id="trAlert" runat="server"> <td><span runat="server" id="spAlert" class="blink_me" style="color:red;text-align:right;font-weight:bold"><asp:Label ID="lblerror" runat="server"></asp:Label></span></td> </tr> </table> <%-- </telerik:RadAjaxPanel>--%> <%--<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function onRequestStart(sender, args) { if (args.get_eventTarget().indexOf("Button") >= 0) { args.set_enableAjax(false); } } </script> </telerik:RadCodeBlock>--%> </div>---------------SurveyRatingModel.ascx<div style="padding:0px 10px 10px;"> <div style="text-align:center;font-family:Arial;font-weight:bold;"> <h5>Rating Model</h5> </div> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> var popUp; function PopUpShowing(sender, eventArgs) { popUp = eventArgs.get_popUp(); var gridWidth = sender.get_element().offsetWidth; var gridHeight = sender.get_element().offsetHeight; var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px")); var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px")); popUp.style.left = ((gridWidth - popUpWidth) / 2 + sender.get_element().offsetLeft).toString() + "px"; popUp.style.top = ((gridHeight - popUpHeight) / 2 + sender.get_element().offsetTop).toString() + "px"; } </script></telerik:RadScriptBlock> <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server"> <script type="text/javascript"> function RowDblClick(sender, eventArgs) { sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); } </script> </telerik:RadScriptBlock> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" ></telerik:RadWindowManager> <%-- <telerik:RadAjaxManagerProxy ID="AjaxManagerProxySurvey" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="gridRatingModel" > <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="gridRatingModel"/> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy>--%> <%-- <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>--%> <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" CssClass="div-container no-bg" > <telerik:RadGrid ID="gridRatingModel" AllowPaging="True" PageSize="5" OnNeedDataSource="gridRatingModel_NeedDataSource" OnItemCommand="gridRatingModel_ItemCommand" OnItemCreated="gridRatingModel_ItemCreated" OnDeleteCommand="gridRatingModel_DeleteCommand" OnInsertCommand="gridRatingModel_InsertCommand" OnUpdateCommand="gridRatingModel_UpdateCommand" OnItemDataBound="gridRatingModel_ItemDataBound" AllowSorting="true" runat="server"> <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <ClientSettings> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" FrozenColumnsCount="2"></Scrolling> </ClientSettings> <ClientSettings> <ClientEvents OnRowDblClick="RowDblClick"></ClientEvents> </ClientSettings> <ExportSettings ExportOnlyData="true" HideStructureColumns="true" OpenInNewWindow="true" IgnorePaging="true"></ExportSettings> <MasterTableView EditMode="EditForms" CommandItemDisplay="Top" CommandItemSettings-ShowRefreshButton="false" DataKeyNames="ID" AutoGenerateColumns="false" InsertItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnFirstPage" > <CommandItemSettings ShowExportToCsvButton="true" ShowExportToExcelButton="true" ShowExportToPdfButton="true" ShowExportToWordButton="true" /> <Columns> <telerik:GridBoundColumn HeaderText="ID" DataField="ID" ReadOnly="True" UniqueName="ID" Display="False"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="SubPerspectiveID" DataField="SubPerspectiveID" ReadOnly="True" UniqueName="SubPerspectiveID" Display="false"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Perspective Category" ItemStyle-Width="100px" DataField="ModelType" UniqueName="ModelType"> <HeaderStyle Width="100px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Perspective" ItemStyle-Width="100px" DataField="PerpectiveClass" UniqueName="PerpectiveClass"> <HeaderStyle Width="100px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Sub Perspective" DataField="HintSubPerspective" Display="false" UniqueName="HintExport"> <HeaderStyle Width="100px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Question" DataField="Question" Display="false" UniqueName="QuestionExport"> <HeaderStyle Width="150px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Sub Perspective" ItemStyle-Width="100px" DataField="HintSubPerspective" UniqueName="Hint"> <HeaderStyle Width="100px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Question" ItemStyle-Width="150px" DataField="Question" UniqueName="Question"> <HeaderStyle Width="150px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="DefaultComment" ItemStyle-Width="150px" DataField="DefaultComment" UniqueName="DefaultComment"> <HeaderStyle Width="150px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Subperspective Type" Display="false" DataField="SubperspectiveType" UniqueName="SubperspectiveType"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Weighting" HeaderStyle-Width="100px" DataField="Weighting" UniqueName="Weighting"> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Rating Factor 1" ItemStyle-Width="100px" DataField="RatingFactor1" UniqueName="RatingFactor1"> <HeaderStyle Width="70px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Rating Factor 2" ItemStyle-Width="150px" DataField="RatingFactor2" UniqueName="RatingFactor2"> <HeaderStyle Width="70px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Rating Factor 3" ItemStyle-Width="150px" DataField="RatingFactor3" UniqueName="RatingFactor3"> <HeaderStyle Width="70px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Rating Factor 4" ItemStyle-Width="150px" DataField="RatingFactor4" UniqueName="RatingFactor4"> <HeaderStyle Width="70px" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="Rating Factor 5" ItemStyle-Width="150px" DataField="RatingFactor5" UniqueName="RatingFactor5"> <HeaderStyle Width="70px" /> </telerik:GridBoundColumn> <telerik:GridEditCommandColumn UniqueName="EditColumn" ButtonType="ImageButton" HeaderText="Edit"> <HeaderStyle Width="70px" /> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn ConfirmText="Delete this Perspective?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" HeaderText="Delete"> <HeaderStyle Width="70px" /> <ItemStyle Width="70px" /> </telerik:GridButtonColumn> </Columns> <EditFormSettings EditFormType="Template"> <FormTemplate> <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none" style="border-collapse: collapse;"> <tr class="EditFormHeader"> <td align="left" > <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Save" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button> <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button> </td> <td></td> <td></td> </tr> <tr> <td> <table id="Table3" width="400px" border="0" class="module"> <tr style="height:40px"> <td class="txtright">Perspective Category: </td> <td> <telerik:RadDropDownList ID="ddlPerspectiveCategory" runat="server" OnSelectedIndexChanged="ddlPerspectiveCategory_SelectedIndexChanged" AutoPostBack="true" TabIndex="7" /> <asp:HiddenField ID="hiddenPerspectiveCateory" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "ModelType") %>' /> </td> </tr> <tr style="height:40px"> <td class="txtright">Perspective: </td> <td> <telerik:RadDropDownList ID="ddlPerpectiveClass" runat="server" OnSelectedIndexChanged="ddlPerpectiveClass_SelectedIndexChanged" AutoPostBack="true" TabIndex="8" /> <asp:HiddenField ID="hiddenPerspectiveClass" runat="server" Value='<%# Bind("PerpectiveClass") %>' /> </td> </tr> <tr style="height:40px"> <td class="txtright">Sub-Perspective: </td> <td> <telerik:RadTextBox ID="txtHint" runat="server" Text='<%# Bind("Hint") %>' TextMode="MultiLine" TabIndex="2" Rows="2" Columns="40"></telerik:RadTextBox> </td> </tr> <tr style="height:40px;"> <td rowspan="2" class="txtright">Question: </td> <td rowspan="2" > <telerik:RadTextBox ID="TextBox5" Text='<%# Bind("Question") %>' runat="server" TextMode="MultiLine" Rows="5" Columns="40" TabIndex="6"> </telerik:RadTextBox> <asp:HiddenField ID="SubPerspectiveID" runat="server" Value='<%# Bind("SubPerspectiveID") %>' /> </td> </tr> <tr> <td colspan="2"></td> </tr> </table> </td> <td style="vertical-align: top"> <table id="Table4" cellspacing="1" cellpadding="1" width="450px" border="0" class="module"> <tr style="height:40px"> <td class="txtright" >Weight: </td> <td> <telerik:RadNumericTextBox ID="txtWeighting" Text='<%# Bind( "Weighting") %>' runat="server" TabIndex="5" ></telerik:RadNumericTextBox> </td> </tr> <tr style="height:40px"> <td class="txtright">Perspective Code: </td> <td> <telerik:RadTextBox ID="txtSubperspectiveType" Enabled="false" ReadOnly="true" Text='<%# Bind( "SubperspectiveType") %>' runat="server" TabIndex="9"> </telerik:RadTextBox> </td> </tr> <tr style="height:40px"> <td class="txtright">Sub-Perspective Code: </td> <td> <telerik:RadTextBox ID="txtSubperspectiveCode" Enabled="false" ReadOnly="true" Text='<%# Bind( "SubPerspectiveID") %>' runat="server" TabIndex="9"> </telerik:RadTextBox> </td> </tr> <tr style="height:40px;"> <td class="txtright">Default Comment: </td> <td > <telerik:RadTextBox ID="RadTextBox1" Text='<%# Bind("DefaultComment") %>' runat="server" TextMode="MultiLine" Rows="4" Columns="40" TabIndex="6"> </telerik:RadTextBox> </td> </tr> </table> </td> <td style="vertical-align: top"> <table id="Table1" cellspacing="1" cellpadding="1" width="350px" border="0" class="module"> <tr style="height:40px"> <td class="txtright">Rating 1: </td> <td> <telerik:RadTextBox ID="TextBox1" Text='<%# Bind("RatingFactor1") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" TabIndex="4"> </telerik:RadTextBox> </td> </tr> <tr style="height:40px"> <td class="txtright">Rating 2: </td> <td> <telerik:RadTextBox ID="TextBox6" Text='<%# Bind("RatingFactor2") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" TabIndex="3"> </telerik:RadTextBox> </td> </tr> <tr style="height:40px"> <td class="txtright">Rating 3: </td> <td> <telerik:RadTextBox ID="TextBox2" Text='<%# Bind("RatingFactor3") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" TabIndex="2"> </telerik:RadTextBox> </td> </tr> <tr style="height:40px"> <td class="txtright">Rating 4: </td> <td> <telerik:RadTextBox ID="TextBox3" Text='<%# Bind("RatingFactor4") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" TabIndex="1"> </telerik:RadTextBox> </td> </tr> <tr style="height:40px"> <td class="txtright">Rating 5: </td> <td> <telerik:RadTextBox ID="TextBox4" Text='<%# Bind("RatingFactor5") %>' runat="server" TextMode="MultiLine" Rows="2" Columns="40" TabIndex="10"> </telerik:RadTextBox> </td> </tr> </table> </td> </tr> </table> </FormTemplate> </EditFormSettings> </MasterTableView> </telerik:RadGrid> <table style="height:30px;"> <tr id="trAlert" runat="server"> <td colspan="4"><span runat="server" id="spAlert" class="blink_me" style="color:red;text-align:right;font-weight:bold"><asp:Label ID="lblerror" runat="server"></asp:Label></span></td> </tr> </table> </telerik:RadAjaxPanel> <%--<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function onRequestStart(sender, args) { if (args.get_eventTarget().indexOf("Button") >= 0) { args.set_enableAjax(false); } } </script> </telerik:RadCodeBlock>--%> </div>now, within each tab, i have grids (user controls) with add/edit/delete.
i am able to manage dynamic load of controls but when i click add/edit/delete, nothing happens until i click 3 times. i see its going in to code but only 3rd time it goes to itemdatabound and that time only i can do add/edit/delete. however, once i enter the data save it and then again i add/edit, i can do it with one click only.no need to click multiple times for the same tab. if i change the tab,again i have to click 3 times.
why? and how to fix it?
i am attaching the code as well as video. please help.
http://screencast.com/t/aY5tEcz1QUeT​
Hi,
I have a RadGrid in my page with "EnableHeaderContextMenu" set to true.
I want to change the texts for the columns in the HeaderContextMenu.
With an older telerik version the code snippet below the function was working, now with the latest Version 2015.2.826.45 it doesn't work anymore.
this.GridView.HeaderContextMenu.ItemClick += this.pContextMenu_ItemClick;
void HeaderContextMenu_PreRender(object sender, EventArgs e) { // Correct the column names for Context Menue Telerik.Web.UI.GridHeaderContextMenu pContextMenue = sender as Telerik.Web.UI.GridHeaderContextMenu; Telerik.Web.UI.RadMenuItem pColumnsContextMenu = pContextMenue.FindChildByValue<Telerik.Web.UI.RadMenuItem>("ColumnsContainer", true); foreach (Telerik.Web.UI.RadMenuItem pItem in pColumnsContextMenu.Items) { pItem.Text = _Regex.Replace(pItem.Text, String.Empty); } }
Kindly help us in solving this issue.
Regards,
Miriam
1. On the page initialization, I am creating the Rad FIlter Component.
this.ComplexFilter = new RadFilter()
{
ID = "ComplexFilter",
AllowFilterOnBlur = true,
ShowApplyButton = false,
Skin = "Vista",
EnableViewState = false
};
this.ComplexFilter.ItemCommand += this.ComplexFilter_OnItemCommand;
this.ComplexFilterPanel.ContentTemplateContainer.Controls.Add(this.ComplexFilter);
fieldEditor.FieldName = column.JsName; // column is the list of items. This I am doing for every column list item.
fieldEditor.DisplayName = column.Name;
fieldEditor.DataType = column.Type;
this.ComplexFilter.FieldEditors.Add(fieldEditor);
var rootGroup = this.Settings.ComplexFilter_Expression;
if (rootGroup != null)
{
this.ComplexFilter.RootGroup.GroupOperation = rootGroup.GroupOperation;
foreach (var expression in rootGroup.Expressions)
{
this.ComplexFilter.RootGroup.AddExpression(expression);
}
}
this.ComplexFilter.PreRender += this.ComplexFilter_OnPreRender;
void ComplexFilter_OnUpdate(object sender, EventArgs args)
{
string previousComplexFilterSql;
string newComplexFilterSql;
if (this.Settings.ComplexFilter_Sql != null)
{
previousComplexFilterSql = this.Settings.ComplexFilter_Sql;
}
else
{
if (this.Settings.ComplexFilter_Expression != null)
{
previousComplexFilterSql = this.Settings.ComplexFilter_Expression.ToWhere(this.TablesTable).ToString();
}
else
{
previousComplexFilterSql = String.Empty;
}
}
if (this.Settings.ComplexFilter_Visible)
{
this.Settings.ComplexFilter_Expression = this.ComplexFilter.RootGroup;
newComplexFilterSql = this.Settings.ComplexFilter_Sql = this.Settings.ComplexFilter_Expression.ToWhere(this.TablesTable).ToString();
}
else
{
newComplexFilterSql = String.Empty;
}
this.ComplexFilter_ReloadData(previousComplexFilterSql, newComplexFilterSql);
ComplexFilter.RecreateControl();
}
2. After every 5 seconds Refresh timeout, I am checking for the complex filter saved settings. But due to the null value of ComplexFilter_Expression, settings could not be fetched from the database.
if (this.ComplexFilter_Visible && this.ComplexFilter_Expression != null)
{
where &= this.ComplexFilter_Expression.GetDBWhere(table, joins, out saveSettings);
}
else
{
saveSettings = false;
}
[WebMethod]public static string GetRows(int from, int len){ DataTable dt = MyEntity_BL.GetData(); //convert DataTable into Json string System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); List<Dictionary<string, object>> rows = new List<Dictionary<string, object>>(); Dictionary<string, object> row = null; foreach (DataRow dr in dt.Rows) { row = new Dictionary<string, object>(); foreach (DataColumn col in dt.Columns) { row.Add(col.ColumnName, dr[col]); } rows.Add(row); } return serializer.Serialize(rows);}function btnShowClientClick(clickedButton) { PageMethods.GetRows(0, 0, Succsess);}function Succsess(result) { var masterTable = $find("<%= grd.ClientID %>").get_masterTableView(); masterTable.set_dataSource(result); masterTable.rebind();}How can I restrict start date and end date in Gantt?
I want user to be unable to insert/update start date before 1 month.
I need server side code.
Thanks
Hello
I've LinkButton in my RadComboBox ItemTemplate with CommandName OnCommand event and Command Argument for delete item if user clicking.
ComboBox populating with SqlDataSource.
When trying to click second item in ComboBox page postabacking but doesnt raise onclick or even oncommand event.
If clicking first item in ComboBox raising both of events but command argument is second items command argument.
Where is the mistake?
Thanks is advance.
I am using a RadGrid element and need to export CSV data from it. When I place a link outside of the RadGrid element, the export works fine:
<a title="Export" onserverclick="Export_CSV_Click" runat="server" class="icon-msexcelexport icon" href="#"></a>
<telerik:RadGrid ID="myGrid" runat="server" EnableViewState="false">
etc...
​
Now when I place that same link within the PagerTemplate, it no longer works and I get a javascript popup error.
<telerik:RadGrid ID="myGrid" runat="server" EnableViewState="false">
<MasterTableView
<PagerTemplate>
<a title="Export" onserverclick="Export_CSV_Click" runat="server" class="icon-msexcelexport icon" href="#"></a>
And the export method..
protected void Export_CSV_Click(object sender, System.EventArgs e)
{
myGrid.MasterTableView.ExportToCSV();
}
How would I get this button working from within the PagerTemplate?