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

Remove indenting of detail tables

2 Answers 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
ToltingColtAcres asked on 30 Oct 2015, 05:48 PM

I have a series of detail tables (3 deep) within a radgrid.

I have defined HierarchyDefaultExpanded="true" to automatically expand all the detail grids.

Screen real-estate is at a premium. I wish to remove the expand/collapse column, and prevent the detail grids from indenting.

I have attempted to use CSS to defined a left-margin of 0px. I have attempted to replace the default images w/ very small GIFs. I've tried about every solution I've been able to google, but nothing appears to work.

The best I can do is "hide" the column, but, when I do that, the child grids are then indented by one column of its parent grid, which is even worse in terms of real estate.

 How can I remove the expand/collapse column completely, and make it so the master/child grids are all left-justified to the left-most side of the window?

2 Answers, 1 is accepted

Sort by
0
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
answered on 30 Oct 2015, 06:17 PM
It appears when you use a Expand/Collapse column, code is generated to automatically add a width style to the column which sets it to 20 pixels:

<table class="rgMasterTable" border="0" id="ctl00_body_RadGrid_Batch_ctl00" style="width:100%;table-layout:auto;empty-cells:show;">
    <colgroup>
        <col style="width:20px" />   <--- The Expand/Collapse Column
        <col  />
        <col  />
        <col  />
    </colgroup>
<thead>
...etc

is there a CSS definition to override this behavior?
0
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
answered on 30 Oct 2015, 09:14 PM
Figured it out.

<style type="text/css">
    .rgExpandCol { display:none !important; }
</style>
Tags
Grid
Asked by
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Answers by
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
Share this question
or