I am probably sure this has been covered somewhere but I cannot find the exact cause of the problem I am experiencing.
I have a grid that has a CommandItemTemplate with an image and Label control. When the grid is populated with data from a pivot query, the expand column expands to beyond 20 pixels with CommandHeaderDispaly=Top. When CommandHeaderDisplay=None, I get the correct width as set by the code I have on the page.
Here is the Grid markup:
<telerik:RadGrid ID="rgdFacilityOT" runat="server" Visible="True" Skin="Office2007"
oncolumncreated="rgdFacilityOT_ColumnCreated"
ondetailtabledatabind="rgdFacilityOT_DetailTableDataBind"
onitemdatabound="rgdFacilityOT_ItemDataBound" AutoGenerateColumns="true"
onitemcreated="rgdFacilityOT_ItemCreated" MasterTableView-ExpandCollapseColumn-HeaderStyle-Width="20px">
<MasterTableView TableLayout="Fixed" CommandItemDisplay="Top">
<CommandItemTemplate>
<div>
<asp:Label runat="server" CssClass="rgHeader" ID="lblFacilityOTGridTitle" Text="" meta:ResourceKey="lblFacilityOTGridTitleResource1"></asp:Label>
<div class="export_button_right">
<asp:ImageButton ID="btnGridExport" ImageUrl="~/Images/Excel-16x16.gif" OnClick="btnExcel_Click"
runat="server" ToolTip="Export To Excel"
meta:resourcekey="btnGridExportResource1" />
</div>
</div>
</CommandItemTemplate>
<CommandItemSettings ShowExportToExcelButton="True"
ShowAddNewRecordButton="False" ExportToPdfText="Export to PDF" />
<ExpandCollapseColumn Resizable="True" Visible="False">
</ExpandCollapseColumn>
<CommandItemSettings ExportToPdfText="Export to PDF" />
<RowIndicatorColumn Visible="False">
</RowIndicatorColumn>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowExpandCollapse="False">
<Scrolling AllowScroll="True" UseStaticHeaders="False" ScrollHeight="">
</Scrolling>
</ClientSettings>
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Office2007">
</HeaderContextMenu>
</telerik:RadGrid>
I just want to be able to control the width of the expand column. I have tried the following CSS:
.rgExpandCol
{
width: 10px !important;
padding-left: 0 !important ;
padding-right: 0 !important ;
text-align: left ;
}
but it still does not work. I am sure it is something simple or I have missed something
I have a grid that has a CommandItemTemplate with an image and Label control. When the grid is populated with data from a pivot query, the expand column expands to beyond 20 pixels with CommandHeaderDispaly=Top. When CommandHeaderDisplay=None, I get the correct width as set by the code I have on the page.
Here is the Grid markup:
<telerik:RadGrid ID="rgdFacilityOT" runat="server" Visible="True" Skin="Office2007"
oncolumncreated="rgdFacilityOT_ColumnCreated"
ondetailtabledatabind="rgdFacilityOT_DetailTableDataBind"
onitemdatabound="rgdFacilityOT_ItemDataBound" AutoGenerateColumns="true"
onitemcreated="rgdFacilityOT_ItemCreated" MasterTableView-ExpandCollapseColumn-HeaderStyle-Width="20px">
<MasterTableView TableLayout="Fixed" CommandItemDisplay="Top">
<CommandItemTemplate>
<div>
<asp:Label runat="server" CssClass="rgHeader" ID="lblFacilityOTGridTitle" Text="" meta:ResourceKey="lblFacilityOTGridTitleResource1"></asp:Label>
<div class="export_button_right">
<asp:ImageButton ID="btnGridExport" ImageUrl="~/Images/Excel-16x16.gif" OnClick="btnExcel_Click"
runat="server" ToolTip="Export To Excel"
meta:resourcekey="btnGridExportResource1" />
</div>
</div>
</CommandItemTemplate>
<CommandItemSettings ShowExportToExcelButton="True"
ShowAddNewRecordButton="False" ExportToPdfText="Export to PDF" />
<ExpandCollapseColumn Resizable="True" Visible="False">
</ExpandCollapseColumn>
<CommandItemSettings ExportToPdfText="Export to PDF" />
<RowIndicatorColumn Visible="False">
</RowIndicatorColumn>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings AllowExpandCollapse="False">
<Scrolling AllowScroll="True" UseStaticHeaders="False" ScrollHeight="">
</Scrolling>
</ClientSettings>
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Office2007">
</HeaderContextMenu>
</telerik:RadGrid>
I just want to be able to control the width of the expand column. I have tried the following CSS:
.rgExpandCol
{
width: 10px !important;
padding-left: 0 !important ;
padding-right: 0 !important ;
text-align: left ;
}
but it still does not work. I am sure it is something simple or I have missed something