Hello experts,
I have a rad grid with 5 groups each having certain number of items. I can sort the groups ascending or decending using sortexpression.
But my need is that, i want to reorder the groups so that the group which i prefer need to be the first one and the
rest may be in any order. simply to say, i want to set certain group to be the first one in the list of groups at runtime.
Below is my GridView code, Please help on this its very urgent.
d
<telerik:RadGrid ID="GridView1" AllowSorting="true" runat="server" MasterTableView-GroupLoadMode="Client" GridLines="None" AutoGenerateColumns="False" Skin="Office2007" Width=100%> |
<groupingsettings casesensitive="False" /> |
<MasterTableView GroupsDefaultExpanded="false"> |
<GroupByExpressions> |
<telerik:GridGroupByExpression> |
<SelectFields> |
<telerik:GridGroupByField FieldAlias="Category" FieldName="Category" HeaderValueSeparator=" " HeaderText=" <b>Available : </b>" FormatString="" ></telerik:GridGroupByField> |
</SelectFields> |
<GroupByFields> |
<telerik:GridGroupByField FieldAlias="Category" FieldName="Category" FormatString="" SortOrder="None" HeaderText=""></telerik:GridGroupByField> |
</GroupByFields> |
</telerik:GridGroupByExpression> |
</GroupByExpressions> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px" /> |
</RowIndicatorColumn> |
<ExpandCollapseColumn > |
<HeaderStyle Width="20px" /> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridTemplateColumn UniqueName="TemplateColumn1" HeaderText="<font color=red> Select</font>"> |
<ItemTemplate> |
<asp:CheckBox ID="CheckBox1" AutoPostBack="true" runat="server"/> |
</ItemTemplate> |
<ItemStyle HorizontalAlign="Left" /> |
</telerik:GridTemplateColumn> |
<telerik:GridTemplateColumn HeaderText="Product" UniqueName="URL"> |
<ItemTemplate> |
<a href=<%# Eval("URL") %> target="_blank" ><%# Eval("Product_Name")%></a> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
<telerik:GridBoundColumn EmptyDataText="&nbsp;" HeaderText="Product" UniqueName="Product_Name" DataField="Product_Name" Visible=False > |
<ItemStyle HorizontalAlign="Left" /> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn EmptyDataText="&nbsp;" HeaderText="Date" UniqueName="Date" DataField="Date"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Resolution" EmptyDataText="&nbsp;" HeaderText="Resolution" |
UniqueName="Resolution"> |
<ItemStyle HorizontalAlign="Left" /> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Percentage_Coverage" EmptyDataText="&nbsp;" |
HeaderText="% Coverage" UniqueName="Percentage_Coverage"> |
<ItemStyle HorizontalAlign="Left" /> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Price" EmptyDataText="&nbsp;" HeaderText="Price ($)" |
UniqueName="Total_Price"> |
<ItemStyle HorizontalAlign="Left" /> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Area" EmptyDataText="&nbsp;" HeaderText="Area" |
UniqueName="Price" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn UniqueName="ViewScene"> |
<ItemTemplate> |
<a href="javascript:openScenePopup('<%# Eval("SubProduct") %>','<%# Eval("AOI") %>','<%# Eval("View_Scene") %>')"><%# Eval("View_Scene") %></a> |
</ItemTemplate> |
<ItemStyle HorizontalAlign="Left" /> |
</telerik:GridTemplateColumn> |
<telerik:GridBoundColumn DataField="SubProduct" EmptyDataText="&nbsp;" HeaderText="SubProduct" |
UniqueName="SubProduct" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Notes" EmptyDataText="&nbsp;" HeaderText="Notes" |
UniqueName="Notes" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Category" EmptyDataText="&nbsp;" HeaderText="Category" |
UniqueName="Category" Visible="False"> |
</telerik:GridBoundColumn> |
<telerik:GridTemplateColumn HeaderText="Recommended" UniqueName="Recommended"> |
<ItemTemplate> |
<img src=<%# Eval("Recommended")%> width=18 height=18 alt="Recommendation is based on your total Area"> |
</ItemTemplate> |
<ItemStyle HorizontalAlign="Center" /> |
</telerik:GridTemplateColumn> |
<telerik:GridBoundColumn DataField="EULA" EmptyDataText="&nbsp;" UniqueName="EULA" Visible="False"> |
</telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
<FilterMenu EnableTheming="True" Skin="WebBlue"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</FilterMenu> |
<GroupPanel Text=""> |
</GroupPanel> |
</telerik:RadGrid> |