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

fix radgrid column width is the tooltip

2 Answers 110 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
prayag ganoje
Top achievements
Rank 1
prayag ganoje asked on 03 May 2011, 04:08 PM
Hello,

I have a tooltip inwhich radgrid is embaded. I observed image column width is too big. though the column width is fixed to 2% its not reducing. Is there any other way to reduce the column width ?

<telerik:RadGrid ID="rg_tt_CSMD_Backlog_By_Status_FL" runat="server" AllowSorting="false"
                GridLines="None"  AllowPaging="true" BorderStyle="NotSet" Height="99.9%"
                Width="99.9%" OnNeedDataSource="rg_tt_CSMD_Backlog_By_Status_FL_NeedDataSource"
                OnItemDataBound ="rg_tt_CSMD_Backlog_By_Status_ItemDataBound"  AutoGenerateColumns="false" HeaderStyle-Wrap="false">
                <MasterTableView DataKeyNames="CASES" CommandItemDisplay="None" TableLayout="Auto"
                    HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="X-Small">
                    <Columns>
                        <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="imageCol" HeaderStyle-Width="2%" >
                            <ItemTemplate>
                                <a href="../CustomerSupport/CaseViewer.aspx?ID=<%#Eval("CASES")%>">
                                    <asp:Image ImageUrl="~/Images/case.png" ID="imgTest" runat="server" BorderWidth="0px" />
                                </a>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="CASES" HeaderText="CASE" DataFormatString="<nobr>{0}</nobr>" HeaderStyle-Width="10%"
                            HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="X-Small">
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="imageappSerial" HeaderStyle-Width="2%">
                            <ItemTemplate>
                                <a href="../AccountManagement/ProductViewer.aspx?ID=<%#Eval("SERIAL")%>">
                                    <asp:Image ImageUrl="~/Images/server_database.png" ID="imgTest" runat="server" BorderWidth="0px" />
                                </a>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn DataField="appSERIAL" HeaderText="SERIAL" DataFormatString="<nobr>{0}</nobr>" HeaderStyle-Width="10%"
                            HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="X-Small">
                        </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="SITE" HeaderText="SITE" DataFormatString="<nobr>{0}</nobr>" HeaderStyle-Width="35%"
                            HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="X-Small">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SUMMARY" HeaderText="SUMMARY" DataFormatString="<nobr>{0}</nobr>" HeaderStyle-Width="48%"
                            HeaderStyle-Font-Bold="true" HeaderStyle-Font-Size="X-Small">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    </ClientSettings>
            </telerik:RadGrid>

Tooltip code:
<telerik:RadToolTipManager ID="ttm_CSMD_Backlog_By_Status_FL" runat="server" EnableShadow="true"
    Animation="Resize" HideEvent="ManualClose" Height="70" Width="75" OnAjaxUpdate="OnAjaxUpdate"
    Position="BottomCenter" RelativeTo="Element" OffsetY="0" OnClientResponseEnd="OnClientResponseEnd">
</telerik:RadToolTipManager>

2 Answers, 1 is accepted

Sort by
0
prayag ganoje
Top achievements
Rank 1
answered on 03 May 2011, 04:13 PM
Plz see the attached image with red highlighted area for more details.
0
Svetlina Anati
Telerik team
answered on 06 May 2011, 12:52 PM
Hi prayag,

To achieve what you want, please go thorugh teh following steps:


1) Set ItemStyle-Width="2%" to the desired columns, not only the header style.
2) Set explicit size to the image - otherwise it will make the parent TD element as big as it is. I tested with sample width of 20px for teh image and this along with 1) worked as you require.

 

 

 

 

 

 

Regards,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
ToolTip
Asked by
prayag ganoje
Top achievements
Rank 1
Answers by
prayag ganoje
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or