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

[Solved] Displaying Heirarchical Data in one row

1 Answer 166 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Harry Cardillo
Top achievements
Rank 1
Harry Cardillo asked on 05 Feb 2010, 11:23 PM
I have a rad grid that displays in the following manner. What I am trying to accomplish to is if you see the columns with the heading(s) Name, LegName, MedicalConditions, DateofBirth and id displays as two rows, as it normally would, but what I would like to do is to have all that data display in ONE Row because it all belongs to one registration. If you look at the two images, image one is how the data comes out of the DB normally. Image two is how I would like to be. Please keep in mind that this is a small example and I actually have more fields than just this, so I am looking for something extensible. Thanks for your help!







1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Feb 2010, 06:28 AM
Hi Harry,

A suggestion would be to  apply the DataFormatString property  in order to prevent text wrapping.Wrapping of text usually take place when the cell text contains white space in between.

ASPX:
<telerik:GridBoundColumn DataField="AthletedID" HeaderText="AthletedID" UniqueName="AthletedID" DataFormatString="<nobr>{0}</nobr>">   
</telerik:GridBoundColumn>   

Another option is by setting the ItemStyle of the column. . Also set the TableLayout to Fixed so that wrapping will occur in accordance with column resizing.

ASPX:

<MasterTableView TableLayout="Fixed" datasourceid="SqlDataSource1" > 
    <Columns> 
         . . .  
        <telerik:GridBoundColumn DataField="ShipName" HeaderText="ShipName" SortExpression="ShipName" UniqueName="ShipName">  
             <ItemStyle Wrap="false" Width="50px"  />  
</telerik:GridBoundColumn> 
    </Columns> 
</MasterTableView> 


Refer the following documentation for more information about preventing wraping for grid cell.
No wrap for grid cell content

Thanks,
Princy.



Tags
Grid
Asked by
Harry Cardillo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or