fix radgrid column width is the tooltip

3 posts, 0 answers
  1. prayag ganoje
    prayag ganoje avatar
    127 posts
    Member since:
    Feb 2010

    Posted 03 May 2011 Link to this post

    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. prayag ganoje
    prayag ganoje avatar
    127 posts
    Member since:
    Feb 2010

    Posted 03 May 2011 Link to this post

    Plz see the attached image with red highlighted area for more details.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 06 May 2011 Link to this post

    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.

Back to Top