
I'm having difficulty understanding why some controls are changing style after a postback. Namely I have a couple RadNumeric controls with spinners. At first load they look and behave as expected. After postback, the style changes somewhat dramatically. Whether or not I use Bootstrap styling the issue persists. I can someone get around it by rolling my own style with !important tags on everything, but seems like a kludge. Any idea of what's going on? Below is code from page that is in question.
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server"> <telerik:RadAjaxManager runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="ddlProduct"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ddlProduct" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="pnl" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" /> <telerik:RadFormDecorator RenderMode="Lightweight" ID="RadFormDecorator1" runat="server" DecorationZoneID="grid" DecoratedControls="All" EnableRoundedCorners="false" /> <h3>Build Plan</h3> <br /> <asp:Panel ID="pnl" runat="server"> <div class="row"> <div class="col-md-1"> <telerik:RadLabel Text="Product" runat="server" CssClass="pull-right" /> </div> <div class="col-md-2"> <telerik:RadDropDownList ID="ddlProduct" runat="server" CssClass="pull-left" Width="150" Height="30"> <Items> <telerik:DropDownListItem Text="Whitney" Value="3" /> <telerik:DropDownListItem Text="Lhotse" Value="4" /> </Items> </telerik:RadDropDownList> </div> <div class="col-md-2"> <telerik:RadNumericTextBox RenderMode="Lightweight" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" runat="server" ID="txtYear" Width="120" Height="30" MinValue="2016" MaxValue="2050" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" CssClass="" Label="Year"> </telerik:RadNumericTextBox> </div> <div class="col-md-2"> <telerik:RadNumericTextBox RenderMode="Lightweight" ShowSpinButtons="true" IncrementSettings-InterceptArrowKeys="true" IncrementSettings-InterceptMouseWheel="true" runat="server" ID="txtWeek" Width="120" Height="30" MinValue="1" MaxValue="53" NumberFormat-DecimalDigits="0" Label="Week"> </telerik:RadNumericTextBox> </div> <div class="col-md-2"> <telerik:RadButton runat="server" ID="btnGo" class="btn btn-default" Height="30" Text="Go" OnClick="btnGo_Click" /> </div> </div> <br /> <div id="grid"> <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" GridLines="None" runat="server" Width="55%" AllowAutomaticInserts="True" PageSize="10" OnItemUpdated="RadGrid1_ItemUpdated" OnPreRender="RadGrid1_PreRender" AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" OnBatchEditCommand="RadGrid1_BatchEditCommand" OnCancelCommand="RadGrid1_CancelCommand"> <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="BuildPlanId" HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False"> <BatchEditingSettings EditType="Cell" /> <CommandItemSettings ShowAddNewRecordButton="false" /> <NoRecordsTemplate> <div> <p class="alert-danger"> There are no records to display</p> </div> </NoRecordsTemplate> <Columns> <telerik:GridBoundColumn DataField="BuildPlanId" HeaderText="Product" Visible="false" UniqueName="BuildPlanId" /> <telerik:GridBoundColumn DataField="Product" HeaderStyle-Width="12%" HeaderText="Product" ReadOnly="true" UniqueName="Product" /> <telerik:GridBoundColumn DataField="Area" HeaderStyle-Width="15%" HeaderText="Area" ReadOnly="true" UniqueName="Area" /> <telerik:GridBoundColumn DataField="Day" HeaderStyle-Width="12%" HeaderText="Day" ReadOnly="true" UniqueName="Day" /> <telerik:GridBoundColumn DataField="Date" HeaderStyle-Width="12%" HeaderText="Date" ReadOnly="true" UniqueName="Date" DataFormatString="{0: MM/dd/yyyy}" /> <telerik:GridTemplateColumn DataField="Quantity" HeaderStyle-Width="10%" UniqueName="Quantity" HeaderText="Quantity"> <ItemTemplate> <%# Eval("Quantity") %> </ItemTemplate> <EditItemTemplate> <telerik:RadNumericTextBox ID="txtQty" runat="server" MinValue="1" MaxValue="300" ShowSpinButtons="true" Width="80" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" /> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn DataField="Shift" HeaderStyle-Width="10%" HeaderText="Shift" Visible="false" UniqueName="Shift" /> </Columns> </MasterTableView> <ClientSettings AllowKeyboardNavigation="true"></ClientSettings> </telerik:RadGrid> </div> </asp:Panel></asp:Content>
<table> <tr> <td valign="top" align="right"> <asp:Label ID="lblSchedule" runat="server" CssClass="labelText" Text="Schedule: "></asp:Label> </td> <td valign="top" align="left" colspan="3"> <telerik:RadButton ID="rdEmployer1" runat="server" ButtonType="ToggleButton" GroupName="Schedule" ToggleType="Radio" AutoPostBack="false" Text="Mon" Value="1"></telerik:RadButton> <telerik:RadButton ID="rdEmployer2" runat="server" ButtonType="ToggleButton" GroupName="Schedule" ToggleType="Radio" AutoPostBack="false" Text="Tue" Value="2"></telerik:RadButton> <telerik:RadButton ID="rdEmployer3" runat="server" ButtonType="ToggleButton" GroupName="Schedule" ToggleType="Radio" AutoPostBack="false" Text="Wed" Value="3"></telerik:RadButton> <telerik:RadButton ID="rdEmployer4" runat="server" ButtonType="ToggleButton" GroupName="Schedule" ToggleType="Radio" AutoPostBack="false" Text="Thr" Value="4"></telerik:RadButton> <telerik:RadButton ID="rdEmployer5" runat="server" ButtonType="ToggleButton" GroupName="Schedule" ToggleType="Radio" AutoPostBack="false" Text="Fri" Value="5"></telerik:RadButton> <telerik:RadButton ID="rdEmployer6" runat="server" ButtonType="ToggleButton" GroupName="Schedule" ToggleType="Radio" AutoPostBack="false" Text="Sat" Value="6"></telerik:RadButton> </td> </tr> </table> protected void btnEmployerEdit_Click(object sender, EventArgs e) { DataSet dsEmploerList = General.General.objService.GetEmployerBYID(Convert.ToInt32(EmployerPK); if (dsEmploerList != null && dsEmploerList.Tables.Count > 0 && dsEmploerList.Tables[0].Rows.Count > 0) { if (Convert.ToString(dsEmploerList.Tables[0].Rows[0]["Schedule"]) == "1") rdEmployer1.Checked = true; if (Convert.ToString(dsEmploerList.Tables[0].Rows[0]["Schedule"]) == "2") rdEmployer2.Checked = true; if (Convert.ToString(dsEmploerList.Tables[0].Rows[0]["Schedule"]) == "3") rdEmployer3.Checked = true; if (Convert.ToString(dsEmploerList.Tables[0].Rows[0]["Schedule"]) == "4") rdEmployer4.Checked = true; if (Convert.ToString(dsEmploerList.Tables[0].Rows[0]["Schedule"]) == "5") rdEmployer5.Checked = true; if (Convert.ToString(dsEmploerList.Tables[0].Rows[0]["Schedule"]) == "6") rdEmployer6.Checked = true; if (Convert.ToString(dsEmploerList.Tables[0].Rows[0]["Schedule"]) == "") rdEmployer1.Checked = rdEmployer2.Checked = rdEmployer3.Checked = rdEmployer4.Checked = rdEmployer5.Checked = rdEmployer6.Checked = false; } } protected void btnEmployerSave_Click(object sender, EventArgs e) { string Scheduler = string.Empty; if (rdEmployer1.Checked == true) Scheduler = "1"; if (rdEmployer2.Checked == true) Scheduler = "2"; if (rdEmployer3.Checked == true) Scheduler = "3"; if (rdEmployer4.Checked == true) Scheduler = "4"; if (rdEmployer5.Checked == true) Scheduler = "5"; if (rdEmployer6.Checked == true) Scheduler = "6"; if (EmployerPK > 0) { EmployerPK = General.General.objService.UpdateEmployer(EmployerPK, Scheduler); } else { EmployerPK = General.General.objService.InsertEmployer(Scheduler); } }
I have radajaxpanel and inside of that I have a radscriptblock. In the block I am writing dynamic javascript code. It has to be updated on postback with the changes made on the page by the user. Now, this process was working well for a while.
However, when I went to review the page. After postback, the javascript did not work. I noticed in firebug that when the page initially loaded I saw the script tag and the dynamic code. When I did a postback, I no longer saw the script tag, and no javascript was loaded. The only thing I recall was that I updated telerik on the site to 2017.1.118.45. Did something change in the newer version or could it be something else?
Hi,
I'm using a RadTreeList with data bound using a DataTable in NeedDataSource.
I set AllowRecursiveSelection to true so that all child nodes are selected too, even if they are not expanded.
Unfortunately, it doesn't work as expected. If I check SelectedItems on the server, I only get a list containing the currently VISIBLE selected items. The child items are not included. If I expand this selected node, the children are selected as expected and appear in the SelectedItems. If I collapse the node again, they don't appear in SelectedItems anymore.
Also, the Items property only contains the currently VISIBLE items, I expected it to contain all items.
The SelectedIndexes property is always correct, but I don't know how I could use this information to find the according data in the DataTable.
What do I have to do to get SelectedItems to return the invisble selected items too?
Thanks!

I have a page with some search criteria. When the page comes up the first time, I would like to present the page with no data in the grid. And once the user clicks the search button, I would populate the grid with data using the search criteria selected.
'Search Button Click Event
Private Sub cmdSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSearch.Click
RadGrid2.DataSource = Data.SubmissionTracking.GetSubmissionDetails()
End Sub
'Rad Grid NeedDataSource Event
Hi,
I have a RadDatePicker with AutoPostBack="true". I need this post back to perform some logic and fetch some value for other controls.
I have having issue with date validation of this control. I have RequiredFieldValidator which check this date field. Now if I make date textbox as empty it fires the validation but also performs a post back which causes issues. How can I check for blank and invalid date in my RadDatePicker on client side and post back only when it has valid values?
<telerik:RadDatePicker ID="rdpStartDate" runat="server" EnableEmbeddedSkins="true" Skin="Bootstrap" RenderMode="Lightweight" OnSelectedDateChanged="rdpStartDate_SelectedDateChanged" AutoPostBack="true"
Calendar-Font-Size="Small" Calendar-CalendarTableStyle-Font-Size="Small" Calendar-DayStyle-Font-Size="Small" Calendar-TitleStyle-Font-Size="Small" />
<asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidatorStartDate" ControlToValidate="rdpStartDate" Display="Dynamic" ErrorMessage="Start Date is invalid." CssClass ="controlValidationLabels"> </asp:RequiredFieldValidator>
hi,
I am looking for ways to hide parent tabs/levels in my page as I dig down a hierarchical tabstrip(Telerik.Web.UI.RadTabStrip) that can go upto 4-5 levels deep and is not looking good on the UI. For exampIe, if I have 5 levels of tabs, I only want to display the fifth level. I am using a sitemap for the page. (I am also building a clickable breadcrumb that will allow the user to navigate back and I do not need the parent tabs when I go beyond 2 levels or so)
When I try to hide the tabs by using the tab.Visible property or the tabstrip.Remove it removes all the children including the one that I actually want to display.
I would appreciate any help you can provide.
Thanks,
Pratheesh