Stuckup in PanelBar and TabStrip integration

2 posts, 0 answers
  1. Aamir Ali Ansari
    Aamir Ali Ansari avatar
    22 posts
    Member since:
    Jun 2010

    Posted 08 Aug 2010 Link to this post

    I am currently working on an application which will open tabs dynamically by clicking items inside panelbars. I wish to ignore few items espeicially title/group elements when clicked. When getting ID or Tab Index, I am getting same values for multiple entries. For example inside panel "Admin" bar and its first child is returning same value (0).

    Furthermore I wish to add click event to an image added to tab for closing reasons. I dont want to use Tab Template feature for this. Any suggestion. My code is in following shape at present.

    protected void RadPanelBar1_ItemClick(object sender, RadPanelBarEventArgs e)
           RadTab NewTab = new RadTab();
           NewTab.Text = e.Item.Text;
           NewTab.ImageUrl = "images/deletecross.gif";
           int sel;
           sel = RadTabStrip1.Tabs.Count();
           RadTabStrip1.SelectedIndex = sel - 1;
  2. Yana
    Yana avatar
    4548 posts

    Posted 11 Aug 2010 Link to this post

    Hello Aamir Ali,

    You can set the Value property of the items to unique values in order to recognize them.
    Regarding the other issue - you should subscribe to OnClientTabSelecting event and check whether the image is clicked:

    <script type="text/javascript">       
        function tabSelecting(sender, args)
            if (args.get_domEvent().target.className.indexOf("rtsImg") > -1) {
                alert("image clicked");
                alert("item clicked");

    here you can read how to remove tabs on the client.

    All the best,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top