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

Hide the left column in grid hierarchy

3 Answers 211 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BRIAN
Top achievements
Rank 1
BRIAN asked on 12 Feb 2009, 03:03 PM
Hi all !

Is there a simply sample code for hide the left column created when i clic for collapse in my radgrid hierarchy ? I just want to have my children items below their parents items for have unique header and good presentation
My grid is just like your exemple in Demo "Three Level hierarchy" !
HTML, CSS, CodeBehind(VB) ?

Thanks a lot !

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Feb 2009, 05:24 AM
Hi Brian,

I guess you are trying to hide the expand/collapse column in hierarchical Grid. If so try the following code snippet in the PreRender event.

VB:
RadGrid1.MasterTableView.GetColumn("ExpandColumn").Display = False 

Go through the following help article which explains how to align Grid columns in a hierarchical Grid.
Aligning columns in each level of hierarchical grid

Shinu



0
BRIAN
Top achievements
Rank 1
answered on 18 Feb 2009, 10:39 AM
Thanks for your answer but it hide my expand button too ! I need to keep it but display the rest of the column bellow ! After, i re-align my others columns for have a good presentation. The real question is : is it possible to not have the offset of hierarchy in a hierarchical radgrid ?

B
0
Princy
Top achievements
Rank 2
answered on 18 Feb 2009, 11:43 AM
Hello Brian,

I hope you are trying to align the detailtable of a grid, right below it's mastertable, so that there is no space between the margins of the mastertable and the detailtable. If this is the case, then, you can set the margin for the detailtable in it's css class, as shown below:
aspx:
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server"
    <MasterTableView DataSourceID="SqlDataSource2"
       <DetailTables> 
          <telerik:GridTableView CssClass="Class1" DataSourceID="SqlDataSource2" runat="server"
            

css:
<style type="text/css"
    .Class1 
    { 
      position:relative !important; 
      margin-left: -19px !important; 
       
    }     
</style> 

Thanks
Princy.
Tags
Grid
Asked by
BRIAN
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
BRIAN
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or