This is a migrated thread and some comments may be shown as answers.

[Solved] Formatting

1 Answer 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jody Harbour
Top achievements
Rank 1
Jody Harbour asked on 22 Feb 2010, 06:13 PM
I am wanting to do something like the following but not really sure how.
<mastertableview>
<columns>
column 1
column 2
column 3
</columns>
</mastertableview>

i like the formating of the above but i have one column that has a whole bunch of text so I would like to create a second row and have it span all columns
<mastertableview>
    <row>
        <columns>
            column 1
            column 2
            column 3
        </columns>
    </row>
    <row>
        <columns>
            long column
        </columns>
    </row>
</mastertableview>

how can something like this be done and still keep the column headers from the first set of columns and not have to stick it all in a template column

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 23 Feb 2010, 05:24 AM
Hi Jody,

A suggestion would be to use the NestedViewTemplate to design your grid .Here is a sample of what I did:

   <telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="true" runat="server" AllowSorting="true"
     <MasterTableView HierarchyDefaultExpanded="true"
         <NestedViewTemplate> 
             <%#Eval("CustomerID")%> 
         </NestedViewTemplate> 
        <ExpandCollapseColumn  Visible="false"
        </ExpandCollapseColumn> 
    </MasterTableView> 
    </telerik:RadGrid> 


You can then hide the ExpandCollapse column using the code snippet below:
RadGrid1.MasterTableView.GetColumn("ExpandColumn").Visible = false;

Hope this helps.

Thanks,
Princy

Tags
Grid
Asked by
Jody Harbour
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or