ColumnGroups: How to change the name of the column after data loaded

3 posts, 0 answers
  1. Moriz
    Moriz avatar
    5 posts
    Member since:
    May 2011

    Posted 16 Jan 2019 Link to this post


    I have installed 2019.1.115.40 trial and I am testing RadGridView and trying to achieve require results using ColumnGroups view. From the documentation I have achieved the following.


    ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();

    view.ColumnGroups[0].Rows.Add(new GridViewColumnGroupRow());


    I have learnt that the "CompanyID" should be same as of the Column-Heading of the data-table (data-source) provided to the grid.

    My question is: Is it possible if I can change this "CompanyID" text after data has been loaded into the grid.

    Or is there anything I can do, as with the datagridview, we use Name property for binding and Text property for display purpose.

    Attached image might help.




  2. Moriz
    Moriz avatar
    5 posts
    Member since:
    May 2011

    Posted 17 Jan 2019 Link to this post

    Thought I should share the solution of the above problem for visitors.

    Following is the help I received from the Support and it worked perfectly.

    "You can leave the default column name which contains the date and hour and only change the HeaderText. For example:"

    radGridView1.Columns["YourColumnName"].HeaderText = "Your Column's Display Text";


    Attached image is of the required result.

  3. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4086 posts

    Posted 18 Jan 2019 Link to this post

    Hello, Moriz,        

    I am glad that the problem you were facing is now resolved. Indeed, the HeaderText property of the columns specifies what text exactly will be displayed in the column's header. You can refer to the Columns section in the online documentation for any further information regarding the grid columns:

     If you need any further assistance please don't hesitate to contact me. 

    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top