I see there are a ton of messages about column widths with static headers, and I think I've gone through all of them and tried all of the tricks to get the column headers to be the correct width, but so far nothing has worked for me. I have a radgrid in a tooltip (not sure if that matters, this seems to happen anywhere I use a radgrid) and have it set to UseStaticHeaders="True". I have the MasterTable layout set to "Fixed", and have all of the column widths specified, header and item. The column widths for the header DO NOT match the item widths. The item widths are correct. I have tried setting the layout to Auto and removing all of the column widths, same result. I am calling the client-side "repaint" method, no change. I'm really not sure what to do at this point. I'll attach a screenshot of what I get, but here's the code I am using in the aspx:
I've also tried setting the MasterTable width to the same width as the RadGrid (548px), and setting it to 95%, which was another suggestion. None of these fixes have worked for me. Any help is appreciated!
Thanks,
Eddie
<telerik:RadGrid ID="radGridAssociates" EnableViewState="True" runat="server" AllowSorting="false" AutoGenerateColumns="false" Skin="Web20" EnableTheming="True" ClientSettings-EnableRowHoverStyle="True" EnableEmbeddedSkins="True" OnItemDataBound="RadGridAssociatesItemDataBound" Width="548px" Height="290px" OnNeedDataSource="RadGridAssociatesNeedDataSource"> <ClientSettings AllowColumnsReorder="False" EnablePostBackOnRowClick="false" ClientEvents-OnRowSelected="usePopup"> <Resizing AllowColumnResize="True" EnableRealTimeResize="True" /> <Selecting AllowRowSelect="True" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True" /> </ClientSettings> <MasterTableView DataKeyNames="Xref" ClientDataKeyNames="Xref" ShowHeadersWhenNoRecords="false" EnableNoRecordsTemplate="true" TableLayout="Fixed" AlternatingItemStyle-Font-Size="11px"> <ItemStyle HorizontalAlign="Center" Font-Size="11px" Width="548px"></ItemStyle> <NoRecordsTemplate> <div style="padding:5px; background:transparent; font-size:12px; text-align:left;"> No associates found </div> </NoRecordsTemplate> <Columns> <telerik:GridClientSelectColumn ButtonType="PushButton" Visible="False" CommandName="Select" Text="Select" UniqueName="column"> </telerik:GridClientSelectColumn> <telerik:GridTemplateColumn HeaderText="PIC" UniqueName="colPic"> <ItemStyle Width="30px"></ItemStyle> <HeaderStyle Font-Size="10px" Wrap="False" Width="30px"/> <ItemTemplate> <img alt='photo' src='<%= GetConfig().imageUrl %>?x=<%# Eval("XREF") %>&s=small' width="30" height="38" style="border:0px;"> </a> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="FLAGS" UniqueName="colFlags"> <ItemStyle Wrap="false" Font-Size="10px" Width="30px"></ItemStyle> <HeaderStyle Font-Size="10px" Wrap="False" Width="30px"/> <ItemTemplate> <asp:Label ID="lblAlerts" CssClass="flags" runat="server"></asp:Label> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn HeaderText="NAME" UniqueName="colName" ItemStyle-HorizontalAlign="Left"> <HeaderStyle Width="110px"></HeaderStyle> <ItemTemplate> <%# Eval("LastName") + ", " + Eval("FirstName") + " " + Eval("MiddleName") %> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn HeaderText="S" DataField="Sex" UniqueName="colSex" HeaderTooltip="Sex"> <HeaderStyle Width="6px" Wrap="False" /> <ItemStyle Width="6px" Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="R" DataField="Race" UniqueName="colRace" HeaderTooltip="Race"> <HeaderStyle Width="7px" Wrap="False" /> <ItemStyle Width="7px" Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="HGT" DataField="Height" UniqueName="colHeight" HeaderTooltip="Height"> <HeaderStyle Width="12px" Wrap="False" /> <ItemStyle Width="12px" Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="WGT" DataField="Weight" UniqueName="colWeight" HeaderTooltip="Weight"> <HeaderStyle Width="14px" Wrap="False" /> <ItemStyle Width="14px" Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="AGE" DataField="Age" UniqueName="colAge" HeaderTooltip="Age"> <HeaderStyle Width="12px" Wrap="False" /> <ItemStyle Width="12px" Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="DOB" DataField="Dob" DataFormatString="{0:d}" UniqueName="colDob" HeaderTooltip="DOB"> <HeaderStyle Width="48px" Wrap="False" /> <ItemStyle Width="48px" Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="XREF" DataField="Xref" UniqueName="colXref" HeaderTooltip="XREF"> <HeaderStyle Width="36px" Wrap="False" /> <ItemStyle Width="36px" Wrap="False" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn HeaderText="MATCHES" DataField="AssociatesMatchCount" UniqueName="colMatchCount"> <HeaderStyle Width="48px" Wrap="False" /> <ItemStyle Width="48px" Wrap="False" /> </telerik:GridBoundColumn> </Columns> <RowIndicatorColumn Visible="False"> </RowIndicatorColumn> <ExpandCollapseColumn Resizable="False" Visible="False"> </ExpandCollapseColumn> <EditFormSettings> <PopUpSettings ScrollBars="None" /> </EditFormSettings> </MasterTableView></telerik:RadGrid>I've also tried setting the MasterTable width to the same width as the RadGrid (548px), and setting it to 95%, which was another suggestion. None of these fixes have worked for me. Any help is appreciated!
Thanks,
Eddie