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

Hide group expand/collapse icons

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 06 Jun 2012, 07:50 AM
Hi,

Is there anyway I can hide the expand/collapse icons based on a value calculated in the GridGroupByExpression?

For example I want to hide the icon if the the GroupByField 'Count' aggregate = 0:

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
            <telerik:RadGrid ID="rdgSurveys" runat="server" AllowPaging="false" Skin="Office2010Silver"
                OnNeedDataSource="rdgSurveys_NeedDataSource" OnItemDataBound="rdgSurveys_ItemDataBound"
                OnItemCreated="rdgSurveys_ItemCreated">
                <MasterTableView AutoGenerateColumns="False" HeaderStyle-HorizontalAlign="Center" HierarchyDefaultExpanded="false">
                    <GroupByExpressions>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="Ref" FieldAlias="Survey" />
                                <telerik:GridGroupByField FieldAlias="Count" FieldName="SumField" Aggregate="Sum" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="Ref" SortOrder="Ascending"></telerik:GridGroupByField>
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>
                    <Columns>
                        <telerik:GridBoundColumn DataField="DateCreated" DataType="System.DateTime" HeaderText="Date Created"
                            UniqueName="DateCreated" DataFormatString="{0:dd MMM yyy hh:mm}" />
                        <telerik:GridBoundColumn DataField="Version" DataType="System.String" HeaderText="Version"
                            UniqueName="Version" />
                        <telerik:GridBoundColumn DataField="Respondent" DataType="System.String" HeaderText="Completed By"
                            UniqueName="Respondent" />
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </telerik:RadAjaxPanel>

 

1 Answer, 1 is accepted

Sort by
0
Abhishek
Top achievements
Rank 2
answered on 06 Jun 2012, 09:35 AM
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Abhishek
Top achievements
Rank 2
Share this question
or