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

Can't expand group after a collapse

2 Answers 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pierre-Antoine DOUCHET
Top achievements
Rank 1
Pierre-Antoine DOUCHET asked on 28 Jun 2012, 08:14 AM
Hello,

I have a problem with the group collaspe/expand. My grid is not grouping by default. If I drag a column to group it, it works. When I collapse it, it also works but when I want to expand the collapsed columns, it won't works. I don't have any error (javascript or server-side).

There's my code :
<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GetVersionMapping._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
                </telerik:RadScriptManager>
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="RadGrid1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                 
                <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" CellSpacing="0" GridLines="None" ShowGroupPanel="True"  >
             
                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
 
                    <MasterTableView HierarchyDefaultExpanded="True" >
                        <Columns>
                            <telerik:GridBoundColumn DataField="Platform" HeaderText="Platform" UniqueName="Platform">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Client" HeaderText="Client" UniqueName="Client">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Application" HeaderText="Application" UniqueName="Application">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Version" HeaderText="Version" UniqueName="Version">
                            </telerik:GridBoundColumn>
                            <telerik:GridDateTimeColumn DataField="Date" HeaderText="Publication Date" UniqueName="Date">
                            </telerik:GridDateTimeColumn>
                        </Columns>
                    </MasterTableView>
 
                    <ClientSettings AllowDragToGroup="True" >
                    </ClientSettings>
 
                </telerik:RadGrid>
                 
            </div>
        </form>
    </body>
</html>

Can you see a problem in my code ?

Thanks by advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 07 Nov 2012, 07:54 AM
Hi,

Try binding the RadGrid using NeedDataSource event. Check  the following Help documentation for details.
Advanced Data-binding (using NeedDataSource event)

Thanks,
Shinu.
0
Pierre-Antoine DOUCHET
Top achievements
Rank 1
answered on 12 Nov 2012, 03:16 PM
Hello Shinu,

Thanks a lot, it works well.
I usually use this method. I don't know why I didn't use it this time.
Tags
Grid
Asked by
Pierre-Antoine DOUCHET
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Pierre-Antoine DOUCHET
Top achievements
Rank 1
Share this question
or