Radgrid NestedViewTemplate and columns

2 posts, 0 answers
  1. Sophie
    Sophie avatar
    4 posts
    Member since:
    Jun 2016

    Posted 14 Jun Link to this post

    I am new in Sitefinity and ASP.NET technologies... 
    I have 2 issues that I am trying to resolve:
    I have a radgrid with 5 columns.
    1. The last column of my grid is a GridColumnGroup containing 3 sub-columns corresponding to 3 actions. I would like to display the header for this GridColumnGroup but not displaying the headers for these 3 sub-columns (for now the 3 sub-columns have an empty header each but I would not want to see at all these headers space (removing the header spaces and not having this row for the 3 sub-columns headers).. Is it possible?

    2. My second issue is to elaborate a NestedViewTemplate as here:
    I first tried to display (in C#) at least a simple text linked to the first row as follow but this is not working. I am a little bit lost with how to do that programmatically?
    ApplicationsGrid.MasterTableView.Items[0].ChildItem.NestedTableViews[0].DataSource = "test expand";
    Thank you for your help.
  2. Eyup
    Eyup avatar
    2942 posts

    Posted 17 Jun Link to this post

    Hi Sophie,

    Straight to the points:

    1. You can access the header item during the PreRender event handler of the grid and traverse and hide the mentioned TableCells by using their Visible="false" or .Style["display"]="none" property. However, please note that this requirement is not tested and may prove error-prone.

    2. You will need to pass a valid DataSourceID to the inner grid as demonstrated in the following live sample:

    Alternatively, you can use programmatic databinding with the DataSource property, similar to attached web site sample.

    I hope this will prove helpful.

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.

Back to Top