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

[Solved] HierarchyLoadMode="Client" Not working

5 Answers 250 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 30 Jul 2013, 08:53 PM
Hi, i'm using 2013.2.717.40

The Expand Collapse Buttons are firing a PostBack even though I believe i've configured the RadGrid to use ClientSide expand/collapse.
What am I doing wrong? I would like the expand and collapse to be handled by the Client.

ASPX:
<code>
<telerik:RadGrid ID="rgInspectionItems" runat="server" Skin="MetroTouch" 
        CellSpacing="0" GridLines="None"
        onneeddatasource="rgInspectionItems_NeedDataSource">
        <ClientSettings AllowGroupExpandCollapse="true" AllowExpandCollapse="true">
        </ClientSettings>
        <MasterTableView HierarchyLoadMode="Client">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="WorkGroupName" HeaderText="Group" />
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="WorkGroupName" />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="41px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn Created="True">
                <HeaderStyle Width="41px" />
            </ExpandCollapseColumn>
        </MasterTableView>
    </telerik:RadGrid>
</code>

ASPX.CS
<code>
 protected void rgInspectionItems_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {             DataTable dt = AppSql.getInspectionItems();
            rgInspectionItems.DataSource = dt;
        }

</code>

Also, what is the Markup needed to Format a Code Snippet?

Thanks,

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Jul 2013, 06:23 AM
Hi Patrick,

If you set HierarchyLoadMode=Client,this will make the hierarchy in client mode.I see that you are using Grouping in your program.To set it in client mode you should use GroupLoadMode="Client". So i guess you don't require a Hierarchy grid.Please try the below code snippet

ASPX:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" DataSourceID="SqlDataSource1"
    GridLines="None" AllowPaging="true" AllowSorting="true">
    <ClientSettings AllowGroupExpandCollapse="true" >
    </ClientSettings>
    <MasterTableView GroupLoadMode="Client">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectFields>
                    <telerik:GridGroupByField FieldName="OrderID" HeaderText="Group" />
                </SelectFields>
                <GroupByFields>
                    <telerik:GridGroupByField FieldName="OrderID" />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <RowIndicatorColumn Visible="False">
            <HeaderStyle Width="41px" />
        </RowIndicatorColumn>
        <ExpandCollapseColumn Created="True">
            <HeaderStyle Width="41px" />
        </ExpandCollapseColumn>
    </MasterTableView>
</telerik:RadGrid>

Hope this helps,else elaborate on your requirements.


Thanks,
Princy
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 31 Jul 2013, 06:33 AM
Hello,

For grouping,  please use below code snippet.

<MasterTableView GroupLoadMode="Client">


Thanks,
Jayesh Goyani
0
Jayesh Goyani
Top achievements
Rank 2
answered on 31 Jul 2013, 06:36 AM
Hello,

what is the Markup needed to Format a Code Snippet?

Please click on below highlighted toolbar button to format your code snippet.



Thanks,
Jayesh Goyani
0
Patrick
Top achievements
Rank 1
answered on 31 Jul 2013, 02:34 PM
<MasterTableView GroupLoadMode="Client"> 
Did the trick. Thanks, didn't see that property.

In regards to formatting the code, my browser (IE8) does not show those options. (see attached Image)


  
0
Jayesh Goyani
Top achievements
Rank 2
answered on 02 Aug 2013, 06:55 AM
Hello,

I am not able to reproduce this issue.
Please check below screenshot.

It will take some time in loading this icon.



Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jayesh Goyani
Top achievements
Rank 2
Patrick
Top achievements
Rank 1
Share this question
or