Altering Autogenerated columns properties of Detailstable

2 posts, 1 answers
  1. Suresh Krishna
    Suresh Krishna avatar
    30 posts
    Member since:
    Sep 2009

    Posted 30 May 2018 Link to this post


    I have a Hierarchy Binding raggrid with details table , I would like to change the header text and width from code. I was able to do that on mastertableview but not able to reach the details table.

    For Each col As GridBoundColumn In rgTestGrid.MasterTableView.AutoGeneratedColumns
    col.HeaderStyle.Width = Unit.Pixel(65)

    Is there any way to change the column header with of details table like this?

    Thanks in advance



  2. Answer
    Eyup avatar
    4046 posts

    Posted 04 Jun 2018 Link to this post

    Hi Suresh,

    Here are some options to achieve this requirement:

    1. If you are using auto-generated columns for the detail tables as well, then you can make avail of the OnColumnCreated event handler:

    2. You can also use the DetailTableDataBind event handler of the grid which provides e.DetailTableView argument:

    3. There is also the option to traverse the tables recursively, similar to the sample explained and demonstrated here:

    I hope this will prove helpful.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top