I'm using the Telerik:RadGrid to display a list of courses. The course information is all in a DataTable bound to the grid.
Most of the data is small and works well as a list, except for the course description which is a large paragraph. I would like the description to be display for each row in the nestedviewtemplate so that it shows up as a full row when the master row is clicked.
I've seen the hierachy template example for the grid control, but that is based on multiple DataTables. All of the information I have is in a single table.
Is there a simple way with the grid to access the DataField for the description from inside the NestedViewTemplate?
Most of the data is small and works well as a list, except for the course description which is a large paragraph. I would like the description to be display for each row in the nestedviewtemplate so that it shows up as a full row when the master row is clicked.
I've seen the hierachy template example for the grid control, but that is based on multiple DataTables. All of the information I have is in a single table.
Is there a simple way with the grid to access the DataField for the description from inside the NestedViewTemplate?
DataTable CourseTable = new DataTable("CourseTable"); |
CourseTable.Columns.Add(new DataColumn("Course", Type.GetType("System.String"))); |
CourseTable.Columns.Add(new DataColumn("Section", Type.GetType("System.String"))); |
CourseTable.Columns.Add(new DataColumn("Title", Type.GetType("System.String"))); |
CourseTable.Columns.Add(new DataColumn("Session", Type.GetType("System.String"))); |
CourseTable.Columns.Add(new DataColumn("Professor(s)", Type.GetType("System.String"))); |
CourseTable.Columns.Add(new DataColumn("Units", Type.GetType("System.Int32"))); |
CourseTable.Columns.Add(new DataColumn("Schedule", Type.GetType("System.String"))); |
CourseTable.Columns.Add(new DataColumn("Cohort", Type.GetType("System.String"))); |
CourseTable.Columns.Add(new DataColumn("Description", Type.GetType("System.String"))); |
<telerik:RadGrid ID="GridCore" runat="server" Skin="WebBlue" AutoGenerateColumns="false"> |
<MasterTableView> |
<NestedViewTemplate> |
<!-- Need to Add the Description column in here" --> |
</NestedViewTemplate> |
<Columns> |
<telerik:GridBoundColumn HeaderText = "Course" DataField = "Course"/> |
<telerik:GridBoundColumn HeaderText = "Section" DataField = "Section"/> |
<telerik:GridBoundColumn HeaderText = "Title" DataField = "Title"/> |
<telerik:GridBoundColumn HeaderText = "Professor(s)" DataField = "Professor(s)"/> |
<telerik:GridBoundColumn HeaderText = "Units" DataField = "Units"/> |
<telerik:GridBoundColumn HeaderText = "Schedule" DataField = "Schedule"/> |
<telerik:GridBoundColumn HeaderText = "Cohort" DataField = "Cohort"/> |
</Columns> |
</MasterTableView> |
</telerik:RadGrid> |