I have a grid with eight bound columns with headers. In each row, below these columns, I need to add a bound "comment" field that spans across all eight columns. Will Card View allow me to do this? Is there an easier way?
3 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 02 Sep 2008, 06:06 AM
Hello Neil,
A suggestion would be to use the NestedViewTemplate with a label in it, set the HierarchyDefaultExpanded property of the grid to true and then hide the auto-generated GroupExpandColumn. You can refer the code given below to achieve this scenario.
aspx:
cs: (to hide the GroupExpandColumn)
Thanks
Princy.
A suggestion would be to use the NestedViewTemplate with a label in it, set the HierarchyDefaultExpanded property of the grid to true and then hide the auto-generated GroupExpandColumn. You can refer the code given below to achieve this scenario.
aspx:
<MasterTableView DataSourceID="SqlDataSource1" HierarchyDefaultExpanded="true" > |
<NestedViewTemplate> |
<asp:Label ID="Label1" runat="server" Text="This is a comment"></asp:Label> |
</NestedViewTemplate> |
<Columns> |
.... |
</Columns> |
</MasterTableView> |
cs: (to hide the GroupExpandColumn)
protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e) |
{ |
if (e.Column is GridExpandColumn) |
{ |
e.Column.Display = false; |
} |
} |
Thanks
Princy.
0
Neil N
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 02 Sep 2008, 03:02 PM
Thanks. This worked great except for one cosmetic issue having specifically to do with NestedViewTemplate which I'll create a new thread for.
0
Shinu
Top achievements
Rank 2
answered on 03 Sep 2008, 05:01 AM
Hi Neil,
Go through the following help article which explains how to set styles in a Hierarchical Grid.
Different styles in each hierarchy level with skin applied
Thanks
Shinu.
Go through the following help article which explains how to set styles in a Hierarchical Grid.
Different styles in each hierarchy level with skin applied
Thanks
Shinu.