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

SOS: Grid WebService and Tooltip

3 Answers 80 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Adek
Top achievements
Rank 1
Adek asked on 09 Sep 2009, 01:47 PM
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); 

                } 
            } 
        } 
    } 

3 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 11 Sep 2009, 04:19 PM
Have you tried tooltipifying your RadGrid? This could be a more viable option.
0
Adek
Top achievements
Rank 1
answered on 14 Sep 2009, 06:15 AM
this example is for server data bind..
I binding data to client in webservice
0
Svetlina Anati
Telerik team
answered on 14 Sep 2009, 02:45 PM
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.
Tags
ToolTip
Asked by
Adek
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Adek
Top achievements
Rank 1
Svetlina Anati
Telerik team
Share this question
or