SOS: Grid WebService and Tooltip

4 posts, 0 answers
  1. Adek
    Adek avatar
    22 posts
    Member since:
    Mar 2009

    Posted 09 Sep 2009 Link to this post

    Hi
    How add tooltip to RadGrid (binding WebService) ?

    Grid:
    <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Vista" 
            AutoGenerateColumns="false" EnableViewState="false" OnRowDrop="RadGrid1_RowDrop" OnItemDataBound="RadGrid1_ItemDataBound" AllowSorting="true"
            <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID"
                <Columns> 
                    <telerik:GridTemplateColumn ItemStyle-Width="1px"
                        <ItemTemplate> 
                            <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Style="text-decoration: none;">></asp:HyperLink> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                     
                    <telerik:GridTemplateColumn HeaderText="ID" Display="false" > 
                        <ItemTemplate> 
                           <asp:Label ID="ID" runat="server" /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                    <telerik:GridBoundColumn DataField="Imie" HeaderText="Imie"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Nazwisko" HeaderText="Nazwisko"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Specjalizacja" HeaderText="Specjalizacja"
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Status" HeaderText="Status"
                    </telerik:GridBoundColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings AllowRowsDragDrop="true"
                <ClientEvents OnRowDataBound="rowDataBound" OnCommand="gridCommand" OnRowDropping="rowDropping" OnRowDragStarted="PobierzKlienta"/> 
                <Selecting AllowRowSelect="true" /> 
                <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
            </ClientSettings> 
        </telerik:RadGrid> 

    Code:
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
        { 
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem) 
            { 
                Control target = e.Item.FindControl("targetControl"); 
                if (!Object.Equals(target, null)) 
                { 
                    if (!Object.Equals(this.RadToolTipManager1, null)) 
                    { 
                        RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("ID").ToString(), true); 

                    } 
                } 
            } 
        } 

  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 11 Sep 2009 Link to this post

    Have you tried tooltipifying your RadGrid? This could be a more viable option.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Adek
    Adek avatar
    22 posts
    Member since:
    Mar 2009

    Posted 14 Sep 2009 Link to this post

    this example is for server data bind..
    I binding data to client in webservice
  5. Svetlina Anati
    Admin
    Svetlina Anati avatar
    2795 posts

    Posted 14 Sep 2009 Link to this post

    Hi daw,

    I assume that you have used the following online demo as a start point for your implementation:

    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/aspajaxgridapplication/defaultcs.aspx?product=grid

    If so and if you also have an update panel as in the demo, please make sure that the RadToolTipManager is also wrapped in the update panel.

    Let us know wether this helps and in case it does not, please provide more details about your setup and the exact problem , e.g does the tooltip not show at all, does it show at first but then disappears, etc. and we will do our best to help.


    Greetings,
    Svetlina
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top