Hi, I have a simple RadGrid control that displays student records, no sorting or anything. However it is a hiararchial rid where the students' grades and other Ids will be displayed in a detail table and visible to only a specific administrative roles.
This Radgrid was created programmacally (partly due to role specifics) using this guidlines found at http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html (Create hierarchical structure programmatically after RadGrid control is declared in the ASPX file) where the function DefineGridStructure() is called in Page_Init() event handler.
My lates requirement concern about how the grid displays its content. The requirement is that the column width must be set relative to the column's content in the Detail Table. I'm trying to achieve the look of this nested detail table seen here (where the "Company Name" column-width varies relatively to the string length inside it) However this example is done in declarative mode as you can see >> http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx where the result detail table seems to resize and best fits the cell content.
Do I have options to make my detail table achieve that look programmatically? I only need to deal with 1st level detail table.
I've tried to extract data in the myUserRig_ItemDataBound event but what's happening is that the Id's column (whose width needs to be set relative to the lengthy Id) will be reset to whatever assigned to HeaderStyle.Width in DefineGridStructure() (which makes the content appear to be cut off) as soon as I expand other record from the parent rid. Please help.
This Radgrid was created programmacally (partly due to role specifics) using this guidlines found at http://www.telerik.com/help/aspnet-ajax/grid-programmatic-creation.html (Create hierarchical structure programmatically after RadGrid control is declared in the ASPX file) where the function DefineGridStructure() is called in Page_Init() event handler.
My lates requirement concern about how the grid displays its content. The requirement is that the column width must be set relative to the column's content in the Detail Table. I'm trying to achieve the look of this nested detail table seen here (where the "Company Name" column-width varies relatively to the string length inside it) However this example is done in declarative mode as you can see >> http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx where the result detail table seems to resize and best fits the cell content.
Do I have options to make my detail table achieve that look programmatically? I only need to deal with 1st level detail table.
I've tried to extract data in the myUserRig_ItemDataBound event but what's happening is that the Id's column (whose width needs to be set relative to the lengthy Id) will be reset to whatever assigned to HeaderStyle.Width in DefineGridStructure() (which makes the content appear to be cut off) as soon as I expand other record from the parent rid. Please help.