Hi,
I want to do custom sorting for which I declared my RadGrid in aspx page as given below:
<telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" DataSourceID="SqlDS" AllowFilteringByColumn="true"
AllowPaging="True" AllowSorting="True" runat="server" Skin="Office2007" OnPageIndexChanged="RadGrid1_PageIndexChanged"
OnPageSizeChanged="RadGrid1_PageSizeChanged" OnSortCommand="RadGrid_SortCommand">
<PagerStyle Mode="NextPrevNumericAndAdvanced" />
<MasterTableView AllowCustomPaging="true" AllowCustomSorting="true">
<PagerStyle Mode="NextPrevNumericAndAdvanced" />
<Columns>
<telerik:GridBoundColumn SortExpression="RollNo" HeaderButtonType="TextButton"
ShowSortIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="StudentName" HeaderButtonType="TextButton" ShowSortIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="Address" HeaderButtonType="TextButton" ShowSortIcon="true">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDS" runat="server" ConnectionString="<%$connectionStrings:cemiConnectionString1%>">
</asp:SqlDataSource>
I want to generate GridBoundColumn's at runtime only as I know which columns I need to show at runtime only. so, I removed the three grid bound columns(RollNo,StudentName and Addresss) from design page. When I remove these columns and adding at runtime, postback is not calling onSortCommand event handler(RadGrid_SortCommand). If I add only RollNo gridboundcolumn then postback is calling my sort event handler for only RollNo column, for others(StudentName,Address) it not calling.
Could you please let me know what is the issue???
Thanks,
Mahesh
I want to do custom sorting for which I declared my RadGrid in aspx page as given below:
<telerik:RadGrid AutoGenerateColumns="False" ID="RadGrid1" DataSourceID="SqlDS" AllowFilteringByColumn="true"
AllowPaging="True" AllowSorting="True" runat="server" Skin="Office2007" OnPageIndexChanged="RadGrid1_PageIndexChanged"
OnPageSizeChanged="RadGrid1_PageSizeChanged" OnSortCommand="RadGrid_SortCommand">
<PagerStyle Mode="NextPrevNumericAndAdvanced" />
<MasterTableView AllowCustomPaging="true" AllowCustomSorting="true">
<PagerStyle Mode="NextPrevNumericAndAdvanced" />
<Columns>
<telerik:GridBoundColumn SortExpression="RollNo" HeaderButtonType="TextButton"
ShowSortIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="StudentName" HeaderButtonType="TextButton" ShowSortIcon="true">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="Address" HeaderButtonType="TextButton" ShowSortIcon="true">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
<asp:SqlDataSource ID="SqlDS" runat="server" ConnectionString="<%$connectionStrings:cemiConnectionString1%>">
</asp:SqlDataSource>
I want to generate GridBoundColumn's at runtime only as I know which columns I need to show at runtime only. so, I removed the three grid bound columns(RollNo,StudentName and Addresss) from design page. When I remove these columns and adding at runtime, postback is not calling onSortCommand event handler(RadGrid_SortCommand). If I add only RollNo gridboundcolumn then postback is calling my sort event handler for only RollNo column, for others(StudentName,Address) it not calling.
Could you please let me know what is the issue???
Thanks,
Mahesh