Hi,
I would like to set a default group on a rad grid but not allow users to change it. Therefore, I do not want to see the group panel at the top of the grid but still display the actual grouping row in the grid itself. (I hope that is clear!)
This is what I currently have:
<telerik:RadGrid ID="rgAdditionalPermissions" runat="server" DataSourceID="odsAdditionalPermissions" GroupingEnabled="true" ShowGroupPanel="false" ClientSettings-AllowDragToGroup="false">
<GroupingSettings ShowUnGroupButton="false" />
<GroupPanel Enabled="false"></GroupPanel>
<MasterTableView AutoGenerateColumns="False" DataSourceID="odsAdditionalPermissions" DataKeyNames="RightId">
<CommandItemSettings ExportToPdfText="Export to PDF" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="RightCategoryName" HeaderText="Category" />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="RightCategoryName" SortOrder="Descending" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridBoundColumn DataField="RightName" FilterControlAltText="Filter RightName column" HeaderText="Permission" SortExpression="RightName" UniqueName="RightName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="chkSelected" runat="server" Checked='<%# Bind("Active") %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
</telerik:RadGrid>
If I want the rows of the Grid to be grouped then I have to set GroupingEnabled="true" but despite setting all others, like ShowGroupPanel to false, it still displays the group panel.
Is it possible to do what I would like RadGrid to do? And if so do you know how I would go about implementing it?
Kind regards
Sidharth
I would like to set a default group on a rad grid but not allow users to change it. Therefore, I do not want to see the group panel at the top of the grid but still display the actual grouping row in the grid itself. (I hope that is clear!)
This is what I currently have:
<telerik:RadGrid ID="rgAdditionalPermissions" runat="server" DataSourceID="odsAdditionalPermissions" GroupingEnabled="true" ShowGroupPanel="false" ClientSettings-AllowDragToGroup="false">
<GroupingSettings ShowUnGroupButton="false" />
<GroupPanel Enabled="false"></GroupPanel>
<MasterTableView AutoGenerateColumns="False" DataSourceID="odsAdditionalPermissions" DataKeyNames="RightId">
<CommandItemSettings ExportToPdfText="Export to PDF" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="RightCategoryName" HeaderText="Category" />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="RightCategoryName" SortOrder="Descending" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridBoundColumn DataField="RightName" FilterControlAltText="Filter RightName column" HeaderText="Permission" SortExpression="RightName" UniqueName="RightName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="chkSelected" runat="server" Checked='<%# Bind("Active") %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
</telerik:RadGrid>
If I want the rows of the Grid to be grouped then I have to set GroupingEnabled="true" but despite setting all others, like ShowGroupPanel to false, it still displays the group panel.
Is it possible to do what I would like RadGrid to do? And if so do you know how I would go about implementing it?
Kind regards
Sidharth