ColumnGroups in print

2 posts, 0 answers
  1. Tomasz
    Tomasz avatar
    2 posts
    Member since:
    Sep 2011

    Posted 26 Aug 2013 Link to this post

    Hi

    I have  problem with print ColumnGroups in RadGridView

    Code:

    RadGridView gridView = new RadGridView()
                    {
                        ItemsSource = TreningData.Items,
                        AutoGenerateColumns = false,
                    };

                    gridView.ColumnGroups.Add(new GridViewColumnGroup() { Header = "Nazwa szkolenia", Name = "TrainingName" });
                    gridView.ColumnGroups.Add(new GridViewColumnGroup() { Header = "Szkolenie", Name = "A" });
                    gridView.ColumnGroups.Add(new GridViewColumnGroup() { Header = "Szkolenie", Name = "B" });

                    GridViewDataColumn C1 = new GridViewDataColumn()
                    {
                        Header = "Nazwa Szkolenia",
                        UniqueName = "TreaningName",
                        TextWrapping = System.Windows.TextWrapping.Wrap,
                        ColumnGroupName = "TreaningName",
                        DataMemberBinding = new System.Windows.Data.Binding() { Path = new PropertyPath("TrainingName") }
                    };


                    GridViewDataColumn T1 = new GridViewDataColumn()
                    {
                        Header = "Trener",
                        UniqueName = "Trener",
                        TextWrapping = System.Windows.TextWrapping.Wrap,
                        ColumnGroupName = "A",
                     
                    };



                    GridViewDataColumn T2 = new GridViewDataColumn()
                    {
                        Header = "Data",
                        UniqueName = "Date",
                        TextWrapping = System.Windows.TextWrapping.Wrap,
                        ColumnGroupName = "A",
                   
                    };



                    gridView.Columns.Add(C1);
                    gridView.Columns.Add(T1);
                    gridView.Columns.Add(T2);

    On screen all is ok but on page I see only first ColumnGroups as in attached file.
    Is there a solution to the problem?
    I used : RadControls for Silverlight v2013.2.724.1050


  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 29 Aug 2013 Link to this post

    Hello Tomasz,

    As I can see from the provided code snippet, there is a typo in the ColumnGroupName property of the first column. The Column's ColumnGroupName is  "TreaningName", but the ColumnGroup's Name is "TrainingName".

    I hope this helps.

    Regards,
    Yoan
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft banner
Back to Top