Dynamic binding and grouping

3 posts, 0 answers
  1. Dirk
    Dirk avatar
    45 posts
    Member since:
    May 2011

    Posted 19 Mar 2012 Link to this post

    I'm using this example to create a dynamic gridview:
    http://blogs.telerik.com/vladimirenchev/posts/11-09-28/dynamic-binding-for-your-silverlight-applications.aspx


    In my application the first 3 columns always have the same column header.
    Is it possible to group these 3 columns directly after loading and hide the grouped header?
    I've tried to use
    <telerik:RadGridView.Columns>
     <telerik:GridViewDataColumn DataMemberBinding="{Binding Location}" Header="Location" IsFilterable="True" 
        IsGroupable="True" IsReadOnly="True" IsReorderable="False" IsResizable="True" IsSortable="False" UniqueName="Location" 
       ShowColumnWhenGrouped="False" />
    </telerik:RadGridView.Columns>
      
    <telerik:RadGridView.GroupDescriptors>
           <telerik:GroupDescriptor Member="Location"
                                  SortDirection="Ascending" />
     </telerik:RadGridView.GroupDescriptors>
    and
    private void Grid_AutoGeneratingColumn(object sender, GridViewAutoGeneratingColumnEventArgs e)
    {
        if (e.Column.UniqueName == "Location")
        {
            e.Cancel = true;
        }
    }

    But this is not working in combination with
    AutoGenerateColumns="True" 
    

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 20 Mar 2012 Link to this post

    Hi,

     I've attached small example project to illustrate you how to achieve your goal. 

    Regards,
    Vlad
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Rikin
    Rikin avatar
    8 posts
    Member since:
    Apr 2012

    Posted 20 Jul 2012 Link to this post

    hi,
     i am using telerik gridview to display data.. it works really great.. 
    but i when i am using grouping that makes some problem to me...

    i have created approximate 8 groups(a->b->c so on.. ) in gridview. now suppose in my first group there are only one sub group. But it show me all the 8 sub group in it.. 
    i am attaching the screen shot of the grid.. 

    so if it is possible to reduce some unnecessary sub groups.. 

    with regards
    Rikin
Back to Top