Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
63 views

I have the following two columns

 

<telerik:GridTemplateColumn HeaderText="Year" UniqueName="Year" Visible="False" Display="False">
    <EditItemTemplate>
        <asp:dropdownlist runat="server" id="ddlYear" appenddatabounditems="True">
            <asp:ListItem Text="-- Select Year --" Value="" />
        </asp:dropdownlist>
        <asp:requiredfieldvalidator ... />
    </EditItemTemplate>
</telerik:GridTemplateColumn>
 
<telerik:GridTemplateColumn HeaderText="Fund" UniqueName="Fund" Visible="False">
    <EditItemTemplate>
        <asp:listbox runat="server" id="lbFund" selectionmode="Multiple" />
        <asp:requiredfieldvalidator ... />
    </EditItemTemplate>
</telerik:GridTemplateColumn>

And here's the HTML output

 

<tr>
   <td>
      <label for="..._ddlReportPeriod">Budget Year:</label>   <!--LABEL-->
   </td>
   <td id="...">
      <select name="...>
         <option value="">-- Select Year --</option>
         ...
      </select>
</td>
</tr>
 
<tr>
   <td>
      Fund Source: <!--NOT A LABEL-->
   </td>
   <td id="...">
      <select size="4" ...>
         <option ...></option>
         ...
      </select>
</td>
</tr><tr>

How come in the first case, I get a <label> tag, but in the 2nd case I don't? Is there a way to fix this?

I trimmed the code as much as I could to make it readable.
Pavel
Top achievements
Rank 1
 answered on 27 Jan 2016
3 answers
186 views

I upgraded a .NET web application from .NET framework 2.0 to .NET framework 4.5. The Telerik controls were also upgraded, from Q3 2010 to Q3 2015. Due to the upgrade, the web application is experiencing some odd behavior which did not exist in the previous version. Mainly, the ItemCommand is not being raised at all on one of the grids. I have searched extensively and tried multiple solutions to no avail. I have included the relevant sections of code below. The source code is quite large and complex, so I won't be including all parts. 

The command that should be firing, will result in filters being displayed. The radgrid contains a radtoolbar which contains a radtollbarbutton, when the button is clicked, I am expecting the item command event to be raised and the filter dialog to be displayed.

Master Page

</head>
<body>
    <form id="form1" runat="server" style="height: 100%;">
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        <StyleSheets>
        <telerik:StyleSheetReference Name="TelerikCustomSkins.Grid.Custom.css" Assembly="TelerikCustomSkins"/>
        <telerik:StyleSheetReference Name="TelerikCustomSkins.Input.Custom.css" Assembly="TelerikCustomSkins"/>
        <telerik:StyleSheetReference Name="TelerikCustomSkins.Menu.Custom.css" Assembly="TelerikCustomSkins"/>
        <telerik:StyleSheetReference Name="TelerikCustomSkins.Calendar.Custom.css" Assembly="TelerikCustomSkins"/>
        <telerik:StyleSheetReference Name="TelerikCustomSkins.ComboBox.Custom.css" Assembly="TelerikCustomSkins"/>
        </StyleSheets>
        </telerik:RadStyleSheetManager>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
         
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="dgFolders">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="dgFolders" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" />
                        <telerik:AjaxUpdatedControl ControlID="actionToolBar" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="dgDocuments">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="dgDocuments" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" />
                        <telerik:AjaxUpdatedControl ControlID="actionToolBar" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="asgDocuments">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="asgDocuments" LoadingPanelID="RadAjaxLoadingPanel1" />
                        <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" />
                        <telerik:AjaxUpdatedControl ControlID="actionToolBar" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadWindowManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
          
                <telerik:AjaxSetting AjaxControlID="actionToolBar">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="actionToolBar" />
                        <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                        <telerik:AjaxUpdatedControl ControlID="ValidationSummary1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                                          
            </AjaxSettings>
            <ClientEvents OnRequestStart="RequestStart" />
        </telerik:RadAjaxManager>
        <div id="MasterDIV" runat="server" style="width: 100%; height: 97%;">
            <div style="display: none; width: 0px; height: 0px;">
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableViewState="false">
                    <Windows>
                        <telerik:RadWindow Behaviors="close, move, resize" runat="server" ID="rwAboutWindow"
                            ReloadOnShow="true" Height="450px" Width="680px" NavigateUrl="~/About.aspx" Modal="true"
                            VisibleStatusbar="false" ShowContentDuringLoad="false" Overlay="true" SkinID="TelerikRadWindow" />
                    </Windows>
                </telerik:RadWindowManager>
            </div>
            <table id="tblMain" width="100%" border="0" cellspacing="0px;" cellpadding="0px;">
                <tr id="trHeader" class="MasterHeader">
                    <td>
                        <div style="float: right; padding-right: 15px; padding-top: 10px;">
                            <asp:Label ID="lblUserId" runat="server" CssClass="LoginNameDiv"></asp:Label>
                        </div>
                        <asp:Image ID="imgApplicationLogo" runat="server" SkinID="ApplicationLogoImage" />
                        <asp:Image ID="imgApplicationLogoTest" runat="server" SkinID="ApplicationLogoImageTest"
                            Visible="false" />
                        <asp:Image ID="imgApplicationLogoDev" runat="server" SkinID="ApplicationLogoImageDev"
                            Visible="false" />
                    </td>
                </tr>
                <tr>
                    <td style="padding-left: 0px; padding-right: 0px;">
                        <div class="SearchBar" style="width:100%;height:100%;">
                            <table id="Table2" class="MasterTableButtons" border="0" style="width:100%;height:100%;" cellspacing="0px;" cellpadding="0px;">
                                <tr>
                                    <td>
                                        <uc1:ActionBar ID="ActionBar" runat="server" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
            <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%"
                Orientation="Horizontal" HeightOffset="97" VisibleDuringInit="false">
                <telerik:RadPane ID="RadPane1" runat="server" Scrolling="None" CssClass="MasterDiv">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                    </asp:ContentPlaceHolder>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </div>
        <div id="Div1" runat="server" style="width: 100%;">
            <table id="Table1" width="100%" cellspacing="1">
                <tr id="trFooterErrorSummary">
                    <td class="MasterFooterErrors">
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" HeaderText="Please correct the following:" />
                    </td>
                </tr>
                <tr id="trFooterSiteMap" class="MasterFooterSiteMap">
                    <td>
                    </td>
                </tr>
                <!--Close Footer Row-->
            </table>
        </div>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" SkinID="TelerikRadAjaxLoadingPanel" />
    </form>
</body>
</html>

Default Page

<asp:Content ID="PlaceHolder" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
     <telerik:RadSplitter ID="rsMain" runat="server" Width="100%" SkinID="TelerikRadSplitter"
        VisibleDuringInit="false" HeightOffset="50" Orientation="horizontal">
        <telerik:RadPane ID="rpLeftPane" runat="server" Scrolling="None" Height="30px">
            <telerik:RadTabStrip ID="TabStrip" runat="server" SkinID="TelerikRadTabStrip" SelectedIndex="0"
                UnSelectChildren="True" ClickSelectedTab="True" AutoPostBack="True" Width="100%"
                MultiPageID="MultiPage" ScrollChildren="true" ScrollButtonsPosition="middle">
                <Tabs>
                    <telerik:RadTab runat="server" Selected="True" Text="Find" PageViewID="RadPageView0"
                        ImageUrl="~/images/search.gif" />
                </Tabs>
                <TabTemplate>
                    <asp:Label ID="lblTabName" runat="server"></asp:Label>
                    <asp:ImageButton ID="ibtnRemoveTab" runat="server" ImageUrl="~/images/Tab_Close_Gray.png"
                        OnClick="ibtnRemoveTab_Click" AlternateText="Close Tab" />
                </TabTemplate>
            </telerik:RadTabStrip>
        </telerik:RadPane>
        <telerik:RadPane ID="RadPane2" runat="server" Scrolling="None">
            <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%"
                Orientation="Horizontal" VisibleDuringInit="false">
                <telerik:RadPane ID="RadPane1" runat="server" Scrolling="None" CssClass="MasterDiv">
                    <telerik:RadMultiPage ID="MultiPage" runat="server" SelectedIndex="0" RenderSelectedPageOnly="true" Height="100%">
                        <telerik:RadPageView ID="RadPageView0" runat="server" EnableViewState="true" Height="100%" Width="100%">
                            <telerik:RadMultiPage ID="SearchMultiPage" runat="server" SelectedIndex="0" RenderSelectedPageOnly="true"
                                Height="100%">
                                <telerik:RadPageView ID="RadPageView3" runat="server" EnableViewState="true" Height="100%" Width="100%">
                                    <telerik:RadSplitter ID="RadSplitter1" runat="server" Height="100%" Width="100%"
                                        Orientation="Horizontal" SkinID="TelerikRadSplitter" BorderSize="0" PanesBorderSize="0"
                                        SplitBarsSize="3px" ResizeWithParentPane="false" VisibleDuringInit="false">
                                        <telerik:RadPane ID="PaneSearch" runat="server" Height="280px" BackColor="#E8F1F8">
                                            <uc1:FolderSearchControl ID="FolderSearchControl1" runat="server" />
                                        </telerik:RadPane>
                                        <telerik:RadSplitBar ID="RadSplitBar1" CollapseMode="Both" runat="server" />
                                        <telerik:RadPane ID="PaneFolderGrid" runat="server" Height="100%" Scrolling="None">
                                            <uc1:FolderGridControl ID="FolderGridControl1" runat="server" />
                                        </telerik:RadPane>
                                    </telerik:RadSplitter>
                                </telerik:RadPageView>
                                <telerik:RadPageView ID="RadPageView4" runat="server" EnableViewState="true" Height="100%" Width="100%">
                                    <telerik:RadSplitter ID="Splitter0" runat="server" Height="100%" Width="100%" Orientation="Horizontal"
                                        SkinID="TelerikRadSplitter" BorderSize="0" PanesBorderSize="0" SplitBarsSize="3px"
                                        ResizeWithParentPane="false" VisibleDuringInit="false">
                                        <telerik:RadPane ID="PaneAdvSearch" runat="server" Height="100%" BackColor="#E8F1F8">
                                            <uc1:AdvDocumentSearchControl ID="AdvDocumentSearchControl" runat="server" />
                                        </telerik:RadPane>
                                        <telerik:RadSplitBar ID="RadSplitBar3" CollapseMode="Both" runat="server" />
                                        <telerik:RadPane ID="PaneAdvSearchGrid" runat="server" Scrolling="None">
                                            <uc1:AdvSearchGridControl ID="AdvSearchGridControl" runat="server" />
                                        </telerik:RadPane>
                                    </telerik:RadSplitter>
                                </telerik:RadPageView>
                            </telerik:RadMultiPage>
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="RadPageView1" runat="server" EnableViewState="true" Height="100%" Width="100%">
                            <telerik:RadSplitter ID="Splitter1" runat="server" Orientation="Horizontal" SkinID="TelerikRadSplitter"
                                Height="100%" Width="100%" BorderSize="0" PanesBorderSize="0" SplitBarsSize="3px"
                                VisibleDuringInit="false" ResizeWithParentPane="true">
                                <telerik:RadPane ID="PaneDocumentHeader" runat="server" Height="130px" Width="100%"
                                    BackColor="#E8F1F8" Scrolling="None">
                                    <telerik:RadComboBox ID="DocumentRCB" Visible="false" AutoPostBack="true" runat="server"
                                        AppendDataBoundItems="true" HighlightTemplatedItems="true" MarkFirstMatch="true"
                                        OnSelectedIndexChanged="DocumentRCB_SelectedIndexChanged" OnDataBound="DocumentRCB_DataBound"
                                        SkinID="TelerikRadComboBox" Width="100%" RenderMode="Lightweight">
                                        <HeaderTemplate>
                                            <ul>
                                                <li class="comboBoxCol1">
                                                    <asp:LinkButton runat="server" ToolTip="Sort By Document Title" ID="docTitle" OnClick="docTitle_click"
                                                        OnPreRender="docTitle_PreRender" Text="Document Title" CssClass="comboBoxColUnsorted"
                                                        EnableViewState="false" /></li>
                                                <li class="comboBoxCol2">
                                                    <asp:LinkButton runat="server" ToolTip="Sort By Retirement System" ID="retSystem"
                                                        OnClick="retSystem_click" OnPreRender="retSystem_PreRender" Text="Retirement System"
                                                        CssClass="comboBoxColUnsorted" EnableViewState="false" /></li>
                                                <li class="comboBoxCol3">
                                                    <asp:LinkButton runat="server" ToolTip="Sort By Document Status" ID="docStatus" OnClick="docStatus_click"
                                                        OnPreRender="docStatus_PreRender" Text="Document Status" CssClass="comboBoxColUnsorted"
                                                        EnableViewState="false" />
                                                </li>
                                                <li class="comboBoxCol4">
                                                    <asp:LinkButton runat="server" ToolTip="Sort By Document Date" ID="docDate" OnClick="docDate_click"
                                                        OnPreRender="docDate_PreRender" Text="Document Date" CssClass="comboBoxColUnsorted"
                                                        EnableViewState="false" />
                                                </li>
                                                <li class="comboBoxCol5">
                                                    <asp:LinkButton runat="server" ToolTip="Sort By Received Date" ID="recDate" OnClick="recDate_click"
                                                        OnPreRender="recDate_PreRender" Text="Received Date" CssClass="comboBoxColUnsorted"
                                                        EnableViewState="false" />
                                                </li>
                                                <li class="comboBoxCol6">
                                                    <asp:LinkButton runat="server" ToolTip="Sort By Capture Source" ID="captureSource"
                                                        OnClick="captureSource_click" OnPreRender="captureSource_PreRender" Text="Capture Source"
                                                        CssClass="comboBoxColUnsorted" EnableViewState="false" />
                                                </li>
                                            </ul>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "<strong>Select one</strong>", "<ul><li class='comboBoxCol1'>" & DataBinder.Eval(Container.DataItem, "DocumentTitle") & "</li>")%>
                                            <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol2'>" & DataBinder.Eval(Container.DataItem, "RetirementSystem") & "</li>")%>
                                            <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol3'>" & DataBinder.Eval(Container.DataItem, "DocumentStatus") & "</li>")%>
                                            <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol4'>" & DataBinder.Eval(Container.DataItem, "DocumentDate").ToString().Split().GetValue(0) & "</li>")%>
                                            <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol5'>" & DataBinder.Eval(Container.DataItem, "ReceivedDate").ToString().Split().GetValue(0) & "</li>")%>
                                            <%#IIf(DataBinder.Eval(Container.DataItem, "DocumentTitle") = "", "", "<li class='comboBoxCol6'>" & DataBinder.Eval(Container.DataItem, "CaptureSource").ToString() & "</li></ul>")%>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <strong>A total of
                                                <asp:Literal runat="server" ID="RadComboItemsCount" />
                                                document(s)</strong>
                                        </FooterTemplate>
                                    </telerik:RadComboBox>
                                    <telerik:RadSplitter ID="SplitterDocumentHeader" runat="server" SkinID="TelerikRadSplitter"
                                        Orientation="Vertical" Height="100%" Width="100%" BorderSize="0" PanesBorderSize="0"
                                        SplitBarsSize="3px" VisibleDuringInit="false">
                                        <telerik:RadPane ID="PaneUserInfo" runat="server" Height="100%" Width="100%">
                                            <uc1:UserInfoControl ID="UserInfoControl1" runat="server" />
                                        </telerik:RadPane>
                                        <telerik:RadSplitBar ID="RadSplitBar5" runat="server" />
                                        <telerik:RadPane ID="PaneRelatedEntities" runat="server" Height="100%" Width="100%"
                                            Scrolling="None">
                                            <uc1:RelatedEntities ID="RelatedEntities1" runat="server" />
                                        </telerik:RadPane>
                                    </telerik:RadSplitter>
                                </telerik:RadPane>
                                <telerik:RadSplitBar ID="RadSplitBar4" CollapseMode="Both" runat="server" />
                                <telerik:RadPane ID="PaneDocumentGrid" runat="server" Height="100%" Scrolling="None">
                                    <uc1:DocumentGridControl ID="DocumentGridControl1" runat="server" />
                                </telerik:RadPane>
                            </telerik:RadSplitter>
                        </telerik:RadPageView>
                        <telerik:RadPageView ID="RadPageView2" runat="server" EnableViewState="true" Height="100%"
                            Width="100%">
                            <uc1:DocumentViewer ID="DocumentViewer1" runat="server" />
                        </telerik:RadPageView>
                    </telerik:RadMultiPage>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </telerik:RadPane>
    </telerik:RadSplitter>
</asp:Content>

Folder Grid Control

<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadFilter1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadFilter1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ApplyButton">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="dgFolders" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<div style="display: none; width: 0px; height: 0px;">
    <telerik:RadWindow ID="rwFilter" runat="server" Behaviors="Move,Close,Resize" Title="Advanced Filter"
        Modal="true" Width="600" Height="350" SkinID="TelerikRadWindow">
        <ContentTemplate>
            <telerik:RadFilter RegisterWithScriptManager="true" runat="server" ID="RadFilter1"
                FilterContainerID="dgFolders" ShowApplyButton="false" OnApplyExpressions="rwFilter_OnApplyExpressions"
                Style="margin: 10px 0 0 10px" SkinID="TelerikRadFilter" ExpressionPreviewPosition="Top" />
            <asp:Panel ID="FilterButtonPanel" runat="server" Style="margin: 10px 0 0 10px; font-size: medium">
                <asp:Button runat="server" ID="ApplyButton" OnClick="ApplyButton_Click" Text="Apply Expressions"
                    OnClientClick="hideFilterBuilderDialog()" />
                <asp:Button runat="server" ID="CancelButton" Text="Cancel" OnClientClick="hideFilterBuilderDialog(); return false;" />
            </asp:Panel>
        </ContentTemplate>
    </telerik:RadWindow>
    <%-- Add this invisible RadDatePicker to get the calendar css to load. --%>
    <telerik:RadDatePicker SkinID="TelerikRadDatePicker" ID="RadDatePicker1" runat="server" />
</div>
<cc1:CommonRadGrid ID="dgFolders" runat="server" AutoGenerateColumns="False" SkinID="TelerikRadGrid"
    AllowSorting="True" AllowPaging="True" Height="100%" GridLines="None" EnableEmbeddedSkins="False" EnableLinqExpressions="False">
    <ClientSettings AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" ReorderColumnsOnClient="true" Resizing-AllowColumnResize="true" Resizing-EnableRealTimeResize="true">
        <Selecting AllowRowSelect="True" />
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        <Resizing ClipCellContentOnResize="False" AllowColumnResize="true"/>
        <ClientEvents OnFilterMenuShowing="filterMenuShowing"/>
    </ClientSettings>
    <FilterMenu OnClientShown="MenuShowing" />
    <GroupingSettings CaseSensitive="False" />
    <SelectedItemStyle Wrap="False" />
    <FilterItemStyle Wrap="False" />
    <AlternatingItemStyle Wrap="False" />
    <ItemStyle Wrap="False" />
    <PagerStyle AlwaysVisible="True" PagerTextFormat="{4} Displaying page {0} of {1}, items {2} to {3} of {5}.  "
        Mode="NextPrevNumericAndAdvanced" />
    <MasterTableView Width="1110px" CommandItemDisplay="Top">
        <CommandItemTemplate>
            <telerik:RadToolBar ID="RadToolBar1" runat="server" OnButtonClick="RadToolBar1_ButtonClick"
                SkinID="TelerikRadToolBar" OnClientButtonClicking="onPanelBarItemClicked" OnPreRender="RadToolBar1_PreRender">
                <Items>
                    <telerik:RadToolBarButton PostBack="true" Text="Toggle Filters" CheckOnClick="true" CommandName="ToggleFilter" ImageUrl="~/App_Themes/Custom/Grid/Filter.gif">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Advanced Filter" CommandName="OpenRadFilter" ImageUrl="~/App_Themes/Custom/Grid/Filter.gif">
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton Text="Clear Filters" CommandName="ShowAll" ImageUrl="~/App_Themes/Custom/Grid/Cancel.gif"
                        Visible='<%# Not String.IsNullOrEmpty(dgFolders.MasterTableView.FilterExpression) %>'>
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
        </CommandItemTemplate>
        <Columns>
            <telerik:GridButtonColumn DataTextField="Id" SortExpression="Id" HeaderText="Id"
                Groupable="False" HeaderButtonType="TextButton" CommandName="OpenCommand" UniqueName="IdLink"
                DataType="System.Int32">
                <headerstyle width="110px" />
            </telerik:GridButtonColumn>
            <telerik:GridBoundColumn Display="False" UniqueName="Id" DataField="Id" SortExpression="Id"
                Groupable="False" HeaderText="Id" HeaderButtonType="TextButton" ReadOnly="True"
                DataType="System.Int32" visible="False">
                <headerstyle width="60px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn Display="False" DataField="DecryptedSSN" SortExpression="DecryptedSSN"
                HeaderText="DecryptedSSN" HeaderButtonType="TextButton" UniqueName="DecryptedSSN"
                Groupable="False" ReadOnly="True" Visible="False">
                <headerstyle width="110px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn Display="False" UniqueName="TypeToString" DataField="TypeToString"
                SortExpression="TypeToString" HeaderText="Entity Type" HeaderButtonType="TextButton"
                Groupable="False" ReadOnly="True">
                <headerstyle width="110px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn Display="False" DataField="Name" SortExpression="Name" HeaderText="Name"
                HeaderButtonType="TextButton" UniqueName="Name" ReadOnly="True" Groupable="False"
                FilterControlWidth="190px">
                <headerstyle width="220px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn Display="False" DataField="MaskedSSN" SortExpression="SSN"
                HeaderText="SSN" Groupable="False" HeaderButtonType="TextButton" UniqueName="SSN"
                ReadOnly="True">
                <headerstyle width="110px" />
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn FilterControlWidth="100px" DataField="DOB" HeaderText="DOB"
                Groupable="False" SortExpression="DOB" UniqueName="DOB" DataFormatString="{0:d}"
                DataType="System.DateTime" Display="False" MinDate="1800-01-01">
                <headerstyle width="130px" />
            </telerik:GridDateTimeColumn>
            <telerik:GridBoundColumn Display="False" DataField="Address" SortExpression="Address"
                Groupable="False" HeaderText="Address" HeaderButtonType="TextButton" UniqueName="Address"
                ReadOnly="True" FilterControlWidth="200px">
                <headerstyle width="250px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn Display="False" DataField="Number" SortExpression="Number"
                Groupable="False" HeaderText="Code" HeaderButtonType="TextButton" UniqueName="Number"
                ReadOnly="True">
                <filtertemplate>
                    <telerik:RadComboBox MarkFirstMatch="true" ID="Number" AutoPostBack="true"
                        Width="100%" AppendDataBoundItems="true" runat="server" OnSelectedIndexChanged="RadComboBoxFilter_SelectedIndexChanged">
                        <Items>
                            <telerik:RadComboBoxItem Text="" />
                        </Items>
                    </telerik:RadComboBox>
                </filtertemplate>
                <headerstyle width="110px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn Display="False" DataField="CountDesc" SortExpression="CountDesc"
                Groupable="False" HeaderText="County" HeaderButtonType="TextButton" UniqueName="CountDesc"
                ReadOnly="True">
                <filtertemplate>
                    <telerik:RadComboBox DropDownWidth="120" MarkFirstMatch="true" ID="CountDesc" AutoPostBack="true"
                        Width="100%" AppendDataBoundItems="true" runat="server" OnSelectedIndexChanged="RadComboBoxFilter_SelectedIndexChanged">
                        <Items>
                            <telerik:RadComboBoxItem Text="" />
                        </Items>
                    </telerik:RadComboBox>
                </filtertemplate>
                <headerstyle width="110px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn Display="False" DataField="Description" SortExpression="Description"
                Groupable="False" HeaderText="Description" HeaderButtonType="TextButton" UniqueName="Description"
                FilterControlWidth="250px" ReadOnly="True">
                <headerstyle width="300px" />
            </telerik:GridBoundColumn>
            <%--<telerik:GridBoundColumn HeaderText=" " UniqueName="EmptyFiller" AllowFiltering="False"
                Groupable="False" AllowSorting="False" DataFormatString=" " />--%>
        </Columns>
    </MasterTableView>
</cc1:CommonRadGrid>

DevOps80
Top achievements
Rank 1
 answered on 27 Jan 2016
20 answers
390 views
Hi..
Does anyone have code that will implement a 'DirtyPanel' and prevent users from navigating away from a page and not saving thier changes?
I have seen examples using the AjaxToolKit and ASP.Net... but it doesn't work with the Telerik controls.
Any ideas how I can create a Telerik IsDirty Panel????

thanks in advance

Maria Ilieva
Telerik team
 answered on 27 Jan 2016
3 answers
221 views

Hi,

 I am using two DateTime Picker (set to BOTH Date&Time) and when I am trying to retrieve data from database, it is throwing an exception. From event viewer, I got this :
Stack trace:    at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
   at System.DateTime..ctor(Int32 year, Int32 month, Int32 day)
   at Telerik.Web.UI.Calendar.Utils.Utility.ConvertToServerDateTimeCollection(DateTimeCollection dateTimeCollection, String inputString) in c:\Users\Administrator\Desktop\UI for ASP.NET AJAX\Telerik.Web.UI_2013_2_717_Source\RadControlsAjaxSource\Telerik.Web.UI\Calendar\Utility\Utility.cs:line 274
   at Telerik.Web.UI.RadCalendar.LoadPostData(String postDataKey, NameValueCollection postCollection) in c:\Users\Administrator\Desktop\UI for ASP.NET AJAX\Telerik.Web.UI_2013_2_717_Source\RadControlsAjaxSource\Telerik.Web.UI\Calendar\RadCalendar.cs:line 5041
   at Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) in c:\Users\Administrator\Desktop\UI for ASP.NET AJAX\Telerik.Web.UI_2013_2_717_Source\RadControlsAjaxSource\Telerik.Web.UI\Common\RadWebControl.cs:line 742
   at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

  •  We are UI for ASP.Net AJAX (Telerik version 2013.2.717.35).
  • It is working fine for few TimeZone like Pacific Time but giving error in like UTC +5.30 etc.
  • The error is only occurring when we are setting it to both (Date & Time ) while it is working fine in only Date Format.

 

I tried Debugging into Telerik Source, and I found that the exception is coming in this funtion:

/// <summary>
/// Converts an input 2D JavaScript array like [[5,10,2005],[6,10,2005],[7,10,2005]] into a DateTimeCollection.
/// </summary>
/// <param name="dateTimeCollection">The DateTimeCollection that will be filled.</param>
/// <param name="inputString">The input string.</param>
internal static void ConvertToServerDateTimeCollection(DateTimeCollection dateTimeCollection, string inputString)
{
int i, BracketCount = 0;

if (String.IsNullOrEmpty(inputString)) return;

for (i = 0; i < inputString.Length; i++)
{
if (inputString[i] == '[')
BracketCount++;
else if (inputString[i] == ']')
BracketCount--;
}
if (BracketCount != 0)
{
throw new FormatException(Constants.Exception.FormatInputJavaScriptDateException);
}

// Remove the "[" and the "]"
inputString = inputString.Replace("[", String.Empty).Replace("]", String.Empty);

string[] ArrDates = inputString.Split(",".ToCharArray());

for (i = 0; i < ArrDates.Length / 3; i++)
{
DateTime CurrentDateTime = new DateTime(Int32.Parse(ArrDates[i * 3]), Int32.Parse(ArrDates[i * 3 + 1]), Int32.Parse(ArrDates[i * 3 + 2]));
dateTimeCollection.Add(new RadDate(CurrentDateTime));
}
}

 

Please suggest some way to get rid from this problem. 

Thanks

Maria Ilieva
Telerik team
 answered on 27 Jan 2016
3 answers
278 views
I searched the site but wasn't able to find a hint on how to chenge the filter options text.

I need to translate the options to Portuguese.
Eyup
Telerik team
 answered on 27 Jan 2016
4 answers
178 views

Hello,

I am trying to add excel style filtering to our current application. To achieve this the solution has been upgraded with the Telerik 15.3.1111.45 upgrade.

 

But after adding

            gridview.AllowFilteringByColumn = true;
            gridview.EnableHeaderContextFilterMenu = true;
            gridview.FilterType = GridFilterType.HeaderContext;

to the constructor of the grid.

I saw a little change in the layout of the header column but no filtermenu button to open. (as mentioned: http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/excel-like-filtering/defaultcs.aspx )

My guess is that I'm forgetting one thing that is needed to show the menu demonstrated in above link.

 

To be sure I'll also post the GridHeaderTemplate that we set as columnheader (and shows everything in the columnheader) (This is basically how column headers showed the info needed before excel style filtering)

        public void InstantiateIn(Control container)
        {
            // Check if column is sorted and show corresponding image
            SortingProp sort = null;
            bool hasSort = controller.CurrentSorting != null && controller.CurrentSorting.TryGetValue(prop.ID, out sort);
            if (hasSort)
            {
                var div = new HtmlGenericControl("div");
                var image = new HtmlImage { Src = "images/grid_sort_" };

                div.Attributes.Add("class", "sort");
                image.Src += sort.SortDirection == MySortDirection.Ascending ? "ascending.png" : "descending.png";

                div.Controls.Add(image);
                container.Controls.Add(div);
            }

            // Check if column is filtered and show corresponding image
            if (controller.IsPropFiltered(prop.ObjProp.ObjProp))
            {
                var image = new HtmlImage { Src = MyFileUrls.CreateSharedImageUrl(ImageRepository.Shared.filter_16, false) };
                image.Attributes.Add("class", "filter");
                container.Controls.Add(image);
            }

            var title = new HtmlGenericControl("div");
            var label = new Literal { Text = prop.ObjProp.TranslGrid };
            title.Attributes.Add("class", "title");
            title.Controls.Add(label);
            container.Controls.Add(title);
        }

 

regards,

Sebastiaan

Konstantin Dikov
Telerik team
 answered on 27 Jan 2016
1 answer
440 views

I have a pannel control, where I want a specific textbox to be selected after the listbox.get_selectedItem(). but in the javascript side if I put #RadTextboxID.focus() it never comes down there and the RadTB is not selected.

MY code in the JS side

function AddNewTask() {
    $('.emptyTaskList').hide();  
    var listbox = $find('rlbTasks');
    $('#lblEditTaskSign').html('Add Task/Milestone');
    $('#lbDeleteTask').hide();
    listbox.get_selectedItem().set_selected(false);
  $( "#rtbName" ).focus();

 

And the page does not post back so setting it in the page_load did not help. 

 

I also tried :

 <telerik:RadTextBox ClientEvents-OnLoad="onClientLoad" runat="server" ID="rtbName" MaxLength="255" />                                                    

function onClientLoad(sender) // executes when loading the RadTextBox 
{
    sender.focus();
}

 

Did not work? how should I approach this issue?

Eyup
Telerik team
 answered on 27 Jan 2016
1 answer
103 views

Hello,

 I have a project that uses the RadAjaxManager all over the place and prior to the upgrade all of the controls would update just fine. Since the upgrade however none of the controls update. The only thing I get back is an error in the console when ever I do an action that should cause an Ajax update. The control bellow is one example of the many controls and pages using the RadAjaxManager 

 Masterpage.master

01.<body>
02.    <form id="form1" runat="server">
03. 
04.    <telerik:RadScriptManager ID="MasterRadScriptManager" runat="server">
05.        <Scripts>
06.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
07.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
08.            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
09.        </Scripts>
10.    </telerik:RadScriptManager>
11. 
12.    <telerik:RadAjaxManager ID="MasterRadAjaxManager" runat="server" EnableAJAX="true" UpdatePanelsRenderMode="Inline" EnableViewState="false">
13.    </telerik:RadAjaxManager>
14. 
15.    <telerik:RadAjaxLoadingPanel ID="MasterRadAjaxLoadingPanel" CssClass="MasterRadAjaxLoadingPanel" Runat="server" height="150px" width="150px">
16.    </telerik:RadAjaxLoadingPanel>

 

ColumnSelectorModule.ascx

01.<%@ Control Language="C#" Inherits="LogicData.CustomerPortal.CustomerPortalView.ColumnSelectorModule"  MasterPageFile="~/Themes/MasterPage.Master" %>
02.<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
03. 
04.        <div class="ColumnSelectorModule">
05.        <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
06.            <AjaxSettings>
07.                <telerik:AjaxSetting AjaxControlID="SourceRadListView">
08.                    <UpdatedControls>
09.                        <telerik:AjaxUpdatedControl ControlID="SourceRadListView" />
10.                        <telerik:AjaxUpdatedControl ControlID="RadListViewDestination" />
11.                    </UpdatedControls>
12.                </telerik:AjaxSetting>
13.                <telerik:AjaxSetting AjaxControlID="RadListViewDestination">
14.                    <UpdatedControls>
15.                        <telerik:AjaxUpdatedControl ControlID="SourceRadListView" />
16.                        <telerik:AjaxUpdatedControl ControlID="RadListViewDestination" />
17.                    </UpdatedControls>
18.                </telerik:AjaxSetting>
19. 
20.            </AjaxSettings>
21.        </telerik:RadAjaxManagerProxy>
22. 
23.        <telerik:RadSplitter ID="ColumnSelectorRadSplitter" runat="server" CssClass="columnselectorradsplitter">
24.            <telerik:RadPane ID="RadPane1" runat="server" Height="100%" Width="333px" Scrolling="Y" CssClass="radpanedestination">
25.                <asp:Label runat="server" ID="AvailableColumnsLabel" CssClass="QuerySettingInfoLabel">
26.                </asp:Label>
27.                <telerik:RadListView ID="SourceRadListView" runat="server" OnNeedDataSource="SourceRadListView_NeedDataSource" ClientIDMode="Predictable" OnItemDrop="SourceRadListView_ItemDrop" AllowPaging="false">...
28.                </telerik:RadListView>
29.            </telerik:RadPane>
30.     
31.            <telerik:RadPane ID="RadPaneDestination" runat="server" Width="333px" Scrolling="Y" CssClass="radpanedestination">
32.                <asp:Label runat="server" ID="QuerySettingInfoLabel" CssClass="QuerySettingInfoLabel">
33.                </asp:Label>
34.                <telerik:RadListView ID="RadListViewDestination" runat="server" OnNeedDataSource="RadListViewDestination_NeedDataSource" OnDataBound="RadListViewDestination_DataBound" DataKeyNames="DataField, QueryColumnSettingId" ClientIDMode="Predictable" OnItemDrop="RadListViewDestination_ItemDrop" AllowPaging="false">...
35.                </telerik:RadListView>
36.            </telerik:RadPane>
37.        </telerik:RadSplitter>
38. 
39.        <asp:Panel runat="server" ID="DebugPanel"></asp:Panel>
40.    </div>

 

Thank you.

-Chris

Viktor Tachev
Telerik team
 answered on 27 Jan 2016
1 answer
51 views
Looking at the example here: http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/edit-form-types/defaultvb.aspx?show-source=true
Is there a way to not have the 2nd item in the list in edit mode/have the edit fields hidden on page load?
Eyup
Telerik team
 answered on 27 Jan 2016
11 answers
440 views

I have a very specific problem with the RadComboBox. I am using it in a RadWindow that is opening like a dialog, and it is near the bottom of the window, so that the expanded drop down has to open up. If I have enough items that the vertical scroll bar is used, I can select an item and move on, but if I go back to the ComboBox to change my selection, it locks and freezes the whole browser window.

I am using Q1 controls, IE Version 7.0.6001.18000.

This lockup/freeze does NOT occur in Firefox 3, and operates as expected.

I checked the vertical versus horizontal scroll, wrap versus no wrapping text, and it seems related to the vertical scroll. If I limit the items in the list so that it does not scroll, it does not lockup. I tried the default and the Vista skin with the same results.

This is a show stopper for me.

Image: http://www.quebesystems.com/images/PopulationDialogTelerikComboIssue.jpg

Ivan Danchev
Telerik team
 answered on 27 Jan 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?