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

RadGrit with DataTable as Datasource. No Columns in the Grid

1 Answer 18 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gunther
Top achievements
Rank 1
Gunther asked on 28 Oct 2016, 06:34 AM

Hello,

 

if i bind a RadGrid with a DataTable as DataSource.
There are no columns in the RadGrid only the DataSource had some.

Displaying the data works.

 

I have to let the user group the columns. It don't work if there are none.

GridColumnGroup colGrp = new GridColumnGroup();
            colGrp.Name = TextBox1.Text;
            colGrp.HeaderText = TextBox1.Text;
             
            RadGrid1.MasterTableView.ColumnGroups.Add(colGrp);
             
            RadGrid1.MasterTableView.Columns[0].ColumnGroupName = TextBox1.Text;
            RadGrid1.MasterTableView.Columns[1].ColumnGroupName = TextBox1.Text;

 

Please take a look at the added pictures.

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 01 Nov 2016, 04:32 PM
Hi Gunther,

I tried to replicate the behavior you describe, however, I was not able to. Please check the attached sample that I used for testing.

The RadGrid in the sample is data-bound to a DataTable filled with dummy data. The functionality is working as expected on my end. Give the sample a try and let me know what should be modified in order to replicate the behavior you are seeing.

Regards,
Viktor Tachev
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
Grid
Asked by
Gunther
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or