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

RadPanelBar ToolTip on Client Side

2 Answers 87 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Imran Javed Zia
Top achievements
Rank 1
Imran Javed Zia asked on 12 Nov 2009, 02:12 PM

Hi,

Is there any way to read/get Tooltip on client side of RadPanelItem?

I am adding items to PanelBar dynamically and assigning tooltip to items as following:

RadPanelItem sItem;

foreach (DataItem d in DataItemList)

{

    sItem = new RadPanelItem(d.t);

    sItem.Value = d.v;

    sItem.ToolTip = scr.t;

    MyPanelBar.Items.Add(sItem);

}


Now I want to do something like:

function MyPanelBar_ClientItemFocus(panelbar, args)

{

    var item = args.get_item();

    alert(item.get_toolTip());            // Is there some way to accouplish it. I am not able to get any propertly or method to do so
                                                    

}


Thanks

Imran Javed Zia 

2 Answers, 1 is accepted

Sort by
0
Accepted
Paul
Telerik team
answered on 16 Nov 2009, 08:07 AM
Hi Imran Javed Zia,

Here's a sample code snippet that shows the needed approach.

<script type="text/javascript">
       function OnClientItemFocus(sender, eventArgs) {
           var item = eventArgs.get_item();
           alert(item.get_linkElement().title);
       }   
   </script>


Kind regards,
Paul
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.
0
Imran Javed Zia
Top achievements
Rank 1
answered on 16 Nov 2009, 08:59 AM
Hi Paul,
Thanks a lot. It works fine and it was of very helpful for me.
Regards,
Imran Javed Zia
Tags
PanelBar
Asked by
Imran Javed Zia
Top achievements
Rank 1
Answers by
Paul
Telerik team
Imran Javed Zia
Top achievements
Rank 1
Share this question
or