RadGrit with DataTable as Datasource. No Columns in the Grid

2 posts, 0 answers
  1. Gunther
    Gunther avatar
    2 posts
    Member since:
    Oct 2016

    Posted 28 Oct Link to this post

    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.

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 01 Nov Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top