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

Styling nestsed table in RadGrid

1 Answer 219 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Preetham
Top achievements
Rank 2
Preetham asked on 22 Sep 2011, 12:37 PM
Hi Team,

I have a radGrid with a nested table which contains radList View and I have to style it as shown in the attachment(Nested_Table.jpg), here i can have multiple rows selected/active/expanded at one point of time.
I am facing 2 issues right now
1. I am a able to use rgSelected class to style the selected row but dont know how style the row which is nested below as shown in(Nested_Table_1.jpg)
2. When multiple rows are expanded if i select a row manually the other two rows are losing the style as shown in (Nested_Table_2.jpg)

the skin i am using for this is
<rad:RadGrid runat="server"
    SkinID="CSFSelectionGrid"  
    HeaderStyle-Wrap="true"
    ItemStyle-Wrap="true"
    AlternatingItemStyle-Wrap="true"
    AllowFilteringByColumn="false"
    EnableEmbeddedSkins="false"
    EnableEmbeddedBaseStylesheet="false"
    GroupingSettings-CaseSensitive="false"
    CssClass="SimpleGrid"
    ImagesPath="~/Skins/Plain/Grid"
    AllowMultiRowSelection="true" >           
        <ClientSettings AllowColumnsReorder="False" ReorderColumnsOnClient="False" AllowExpandCollapse="True">
                        <Selecting AllowRowSelect="True"/>
                        <Scrolling AllowScroll="false" UseStaticHeaders="True"/>
        </ClientSettings>
        <MasterTableView AllowNaturalSort="false" AllowCustomSorting="true" >
             
        </MasterTableView>
</rad:RadGrid>
 and the class changes are
.SimpleGrid .rgSelectedRow td,
.SimpleGrid .rgSelectedRow td.rgSorted
{
    background-color:#b0c5da;
    border-bottom:1px solid #ccc !important;
}
and the server code is
protected void RequestCSFs_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.ExpandCollapseCommandName && e.Item is GridDataItem)
    {
        ((GridDataItem)e.Item).ChildItem.FindControl(NESTED_VIEW_TEMPLATE_PANEL).Visible = e.Item.Selected = !e.Item.Expanded;
    }
}

Please suggest me how to achieve the desired result.
Thanks,
Preetham

1 Answer, 1 is accepted

Sort by
0
Preetham
Top achievements
Rank 2
answered on 27 Sep 2011, 02:08 PM
Hi Team,

I hope you people are working towards solving this issue.
Meanwhile, I could solve my second problem by setting the AllowRowSelect to false
<Selecting AllowRowSelect="False"/>
But I still did not find any solution for my first issue.

Please suggest me with any solution.

Thanks,
Preetham.
Tags
Grid
Asked by
Preetham
Top achievements
Rank 2
Answers by
Preetham
Top achievements
Rank 2
Share this question
or