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

Setting Table Width

1 Answer 147 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Deepak
Top achievements
Rank 1
Deepak asked on 03 Jun 2014, 01:00 PM
Hi,

New to Telerik and using a RadGrid which outputs the following html:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<div id="divCodeGrid">
                                                                                                    <div tabindex="0" disabled="" class="RadGrid RadGrid_Default RadGrid_Default rgMasterTable OverFlow" id="ts1_tabPnlCodeProv_rgCode" style="width: 99%;">

<div class="rgHeaderDiv" id="ts1_tabPnlCodeProv_rgCode_GridHeader" style="width: 100%; overflow: hidden;">

<table class="rgMasterTable rgClipCells" id="ts1_tabPnlCodeProv_rgCode_ctl00_Header" style="width: 100%; overflow: hidden; table-layout: fixed; empty-cells: show;" border="0" cellspacing="0">
<colgroup>
<col style="width: 60px;">
<col style="width: 60px;">
<col style="width: 160px;">
<col style="width: 80px;">
</colgroup>
<thead>
<tr>
<th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Code')) return false;" href="">Code</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl05" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Code__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Code')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl06" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Code__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Code')) return false;" type="submit" value="  "></th><th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('ADA')) return false;" href="">ADA</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl08" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__ADA__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('ADA')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl09" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__ADA__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('ADA')) return false;" type="submit" value="  "></th><th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Description')) return false;" href="">Description</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl11" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Description__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Description')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl12" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Description__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Description')) return false;" type="submit" value="  "></th><th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Type')) return false;" href="">Type</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl14" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Type__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Type')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl15" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Type__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Type')) return false;" type="submit" value="  "></th>
</tr>
</thead><tbody style="display: none;"><tr><td colspan="4"></td></tr></tbody>
</table>
</div>
<div disabled="" class="rgDataDiv" id="ts1_tabPnlCodeProv_rgCode_GridData" style="width: 100%; height: 184.5px; overflow: auto;">

<table class="rgMasterTable rgClipCells" id="ts1_tabPnlCodeProv_rgCode_ctl00" style="width: 922px; overflow: hidden; table-layout: fixed; empty-cells: show;" border="0" cellspacing="0">
<colgroup>
<col style="width: 60px;">
<col style="width: 60px;">
<col style="width: 160px;">
<col style="width: 80px;">
</colgroup>
<tbody>
<tr class="rgNoRecords">
<td style="text-align: left;" colspan="4">
                                                                                                            </td>
</tr>
</tbody>

</table> </div>
<input name="ts1_tabPnlCodeProv_rgCode_ClientState" id="ts1_tabPnlCodeProv_rgCode_ClientState" type="hidden" autocomplete="off">
</div>

                                                                                                </div>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
I would like to change the width to 100% instead of 922px(in the bolded text). Have already set the MasterTableView to 

1.<MasterTableView DataKeyNames="ConditionCodeID" TableLayout="Fixed" Width="100%" >

Not sure what I am missing.

Thanks,

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 05 Jun 2014, 12:28 PM
Hi Deepak,

Can you please send us a live URL which demonstrates the problem with the MasterTableView width, so we can inspect it locally?

Regards,
Pavlina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Deepak
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or