Can't expand group after a collapse

3 posts, 1 answers
  1. Pierre-Antoine DOUCHET
    Pierre-Antoine DOUCHET avatar
    11 posts
    Member since:
    Oct 2009

    Posted 28 Jun 2012 Link to this post

    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. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 07 Nov 2012 Link to this post

    Hi,

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

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pierre-Antoine DOUCHET
    Pierre-Antoine DOUCHET avatar
    11 posts
    Member since:
    Oct 2009

    Posted 12 Nov 2012 Link to this post

    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.
Back to Top