OnSortCommand in not triggered when clicked on columns header

1 posts, 0 answers
  1. Vibhav
    Vibhav avatar
    1 posts
    Member since:
    Mar 2018

    Posted 14 Mar 2018 Link to this post

    Hey I'm trying to sort my RadGrid columns using OnsortCommand event, but the event never fire's when clicked on column header.

    Below the code for my Radgrid RadGrid<telerik:radgrid runat="server" id="EnergyWindowPresetGrid" cellspacing="0" gridlines="None" style="outline: none;"EnableViewState="True"OnNeedDataSource="TasksGrid_OnNeedDataSource"OnPreRender="TasksGrid_OnPreRender"AutoGenerateColumns="False"OnItemDataBound="TasksGrid_OnItemDataBound"OnSelectedIndexChanged="TasksGrid_OnSelectedIndexChanged"OnItemCreated="OnItemCreated"OnItemCommand="OnItemCommand">  <clientsettings>   <Scrolling AllowScroll="true" ScrollHeight="300px" UseStaticHeaders="true" />   <telerik:ClientEvents OnGridCreated="GridCreated" /></clientsettings><mastertableview tablelayout="Auto" AllowMultiColumnSorting="True" ><Columns><telerik:GridBoundColumn UniqueName="Preset" DataField="Preset" HeaderStyle-Width="180px" SortExpression="Preset" HeaderButtonType="TextButton"AllowSorting="True"OnSortCommand="OnSortCommand"/><telerik:GridBoundColumn UniqueName="CreatedBy" DataField="CreatedBy"  HeaderStyle-Width="100px" SortExpression="CreatedBy" HeaderButtonType="TextButton" /><telerik:GridBoundColumn UniqueName="ModificationDate" DataField="ModificationDate"  HeaderStyle-Width="100px" SortExpression="ModificationDate" HeaderButtonType="TextButton"/>  <telerik:GridTemplateColumn UniqueName="Edit" ReadOnly="True" HeaderStyle-Width="95px"><ItemTemplate><telerik:RadButton runat="server" CommandName="EditPreset" ID="EditButton" Width="100%"/></ItemTemplate></telerik:GridTemplateColumn><telerik:GridBoundColumn UniqueName="Delete" DataField="Delete" HeaderStyle-Width="20px"/>  </Columns></mastertableview></telerik:radgrid><telerik:RadButton ID="CreatePreset" Text="+" runat="server" Width="1%" font="ArialBold" OnClick="CreatePreset_OnClick"></telerik:RadButton>

    can anyone tell what is wrong with the code....

Back to Top