This is a migrated thread and some comments may be shown as answers.

ItemCommand event not being raised

3 Answers 155 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DevOps80
Top achievements
Rank 1
DevOps80 asked on 15 Jan 2016, 08:18 PM

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>

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 20 Jan 2016, 10:07 AM
Hello Cliff,

I have gone through the code snippets, but I could not find anything that could prevent the ItemCommand from firing. 

Here is a simple example that works correctly on my side:
<telerik:RadGrid ID="dgFolders" runat="server" AutoGenerateColumns="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCommand="dgFolders_ItemCommand"
    AllowSorting="True" AllowPaging="True" Height="100%" 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" />
    </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" SkinID="TelerikRadToolBar">
                <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>
                </Items>
            </telerik:RadToolBar>
        </CommandItemTemplate>
    </MasterTableView>
</telerik:RadGrid>

And the code-behind:
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    DataTable table = new DataTable();
    table.Columns.Add("ID", typeof(int));
    table.Columns.Add("Column1", typeof(int));
    table.Columns.Add("Column2", typeof(int));
    table.Columns.Add("Column3", typeof(int));
    for (int i = 0; i < 5; i++)
    {
        table.Rows.Add(i, 20, 10, 410);
    }
 
    (sender as RadGrid).DataSource = table;
}
 
protected void dgFolders_ItemCommand(object sender, GridCommandEventArgs e)
{
 
}

Please ensure that there are no JavaScript errors on your page.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
DevOps80
Top achievements
Rank 1
answered on 25 Jan 2016, 05:39 PM

Hello Konstantin,

I created a test project and added the code provided in your example above. The dgFolders_ItemCommand is not firing in that scenario either. I placed a break point in visual studio on the dgFolders_ItemCommand, the breakpoint is never reached when clicking the Toggle Filters button.

 Additionally, in the snippets I provided above, I discovered if the two other grids on the default page are commented out, DocumentGridControl1 and AdvSearchGridControl, then FolderGridControl1 (dgFolders) will raise the ItemCommand event correctly. It is not clear to me why the declaration of two additional grids on the page, would interfere with the ItemCommand event being raised. Again, this worked properly prior to the upgrade from Q3 2010 to Q3 2015.

Regards,

DevOps80

0
DevOps80
Top achievements
Rank 1
answered on 27 Jan 2016, 01:55 PM

Hello again,

I have a scaled down version of the source that exhibits the same behavior described above. I will submit a formal support ticket and attach the source. Any findings that resolve the issue I will post here.

Thanks,
Cliff

Tags
Grid
Asked by
DevOps80
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
DevOps80
Top achievements
Rank 1
Share this question
or