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

Radgrid grouping doesn't work

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Angel
Top achievements
Rank 1
Angel asked on 23 Apr 2013, 04:39 PM
i'm using radgrid but the grouping doesn't work 
Here's my code:
 
<telerik:RadGrid ID="gvEvenement" runat="server" AllowPaging="True" CellSpacing="0"
            Culture="fr-FR" AllowSorting="True" AutoGenerateColumns="False" OnNeedDataSource="gvEvenement_NeedDataSource"
            Skin="WebBlue" GridLines="None" OnPreRender="gvEvenement_PreRender" AllowMultiRowSelection="True"
            ShowFooter="True" AllowAutomaticInserts="True" AllowCustomPaging="True" AllowFilteringByColumn="True"
            ShowGroupPanel="True" >
            <ClientSettings EnablePostBackOnRowClick="false" EnableRowHoverStyle="true" AllowColumnsReorder="true"
                AllowDragToGroup="True">

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Apr 2013, 03:52 AM
Hi,

Please check the following sample code snippet I tried code snippet.

ASPX:
<telerik:RadGrid ID="gvEvenement" runat="server" AllowPaging="True" CellSpacing="0"
    Culture="fr-FR" AllowSorting="True" AutoGenerateColumns="False" Skin="WebBlue"
    GridLines="None" AllowMultiRowSelection="True" ShowFooter="True" AllowAutomaticInserts="True"
    AllowCustomPaging="True" AllowFilteringByColumn="True" ShowGroupPanel="True"
    OnNeedDataSource="gvEvenement_NeedDataSource">
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn DataField="OrderID" HeaderText="OrderID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EmployeeID" HeaderText="EmployeeID">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="false" EnableRowHoverStyle="true" AllowColumnsReorder="true"
        AllowDragToGroup="True">
    </ClientSettings>
</telerik:RadGrid>

C#:
protected void gvEvenement_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    string selectQuery1 = "select top 10 * from Orders";
    SqlDataAdapter adapter1 = new SqlDataAdapter(selectQuery1, conn);
    conn.Open();
    adapter1.Fill(dt1);
    conn.Close();
    gvEvenement.DataSource = dt1;    
}

Thanks,
Princy.
Tags
Grid
Asked by
Angel
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or