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

[Solved] radgrid basic formatting

1 Answer 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 11 Sep 2009, 03:01 PM

 


I have a basic setup like below for a grid. I just want to have the gradient padded background on the details table that  a lot of the samples have in order to improve how the data appears. I believe it has something to do with the nestedview settings, but I'm not sure how to use it with the detailtables view. For instance, it looks like the samples apply a viewwrap css class to the details, but they all use outputted html, while i'm using a gridtableview. I'm not sure how to apply it in my situation.

<
telerik:RadGrid ID="DevelopmentGoalGrid" runat="server" ..>

 

 

<MasterTableView DataKeyNames="GoalId" DataSourceID="GoalsData" HierarchyDefaultExpanded="true"

 

 

TableLayout="Auto" AllowPaging="false">

 

 

<DetailTables>

 

 

<telerik:GridTableView Name="ActivityDetails" DataKeyNames="ActivityId" Width="100%"

 

 

runat="server" AutoGenerateColumns="false" AllowPaging="false" CssClass="viewWrap" nes >

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="GoalId" MasterKeyField="GoalId" />

 

 

</ParentTableRelation>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridButtonColumn Text="Select" ButtonType="LinkButton" CommandName="SelectActivity" />

 

 

<telerik:GridBoundColumn HeaderText="Activity" UniqueName="ActivityName" DataField="Name"

 

 

SortExpression="Name">

 

 

</telerik:GridBoundColumn></Columns>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn Visible="True">

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<ClientSettings>

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 14 Sep 2009, 12:10 PM
Hello Jason,

Please refer to the following code library example:

http://www.telerik.com/community/code-library/aspnet-ajax/grid/how-to-obtain-reference-to-radgrid-detailtables-containing-rows-and-cells-and-customize-their-appearance.aspx

It shows how to set a custom CSS class to the table cell, which contains the detail table ("DetailRowCell"). You can then apply some padding or background styles to that table cell. Alternatively, you can set margin to the detail tables (they use the rgDetailTable CSS class natively in the latest RadGrid versions).

Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Jason
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or