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

ColumnGroups in print

1 Answer 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tomasz
Top achievements
Rank 1
Tomasz asked on 26 Aug 2013, 03:53 PM
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


1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 29 Aug 2013, 04:24 PM
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 >>
Tags
GridView
Asked by
Tomasz
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or