RadPanelBar ToolTip on Client Side

3 posts, 1 answers
  1. Imran Javed Zia
    Imran Javed  Zia avatar
    55 posts
    Member since:
    Jul 2009

    Posted 12 Nov 2009 Link to this post

    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. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 16 Nov 2009 Link to this post

    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.
  3. Imran Javed Zia
    Imran Javed  Zia avatar
    55 posts
    Member since:
    Jul 2009

    Posted 16 Nov 2009 Link to this post

    Hi Paul,
    Thanks a lot. It works fine and it was of very helpful for me.
    Regards,
    Imran Javed Zia
Back to Top