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

Panel Bar

3 Answers 48 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
John ryan
Top achievements
Rank 1
John ryan asked on 07 Jun 2013, 09:12 AM
I've created a panel bar in codebehind  and I want to include the onclick event of it,. below are my sample source code

  protected void Page_Load(object sender, EventArgs e)
    {
         RadPanelItem item11 = new RadPanelItem();
        item11.Text = "Add Security Question"; item1.Items.Add(item11);
        item11.ImageUrl = "Img/Slidding/TabstripPr.gif";
   
        ---here i want to register the onclick event  of the panelitem but i dont know how to do it.
        ---the idea of doing this is to build dynamic slidding menu bar through code behind and load the user control inside the tabstrip

       thanks,
    ryan

}

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Jun 2013, 12:16 PM
Hi,

You can catch the click event for a panelbar item by itemclick event of RadPanelBar as shown below.
C#:
protected void Page_Load(object sender, EventArgs e)
  {
     RadPanelItem menuitem = new RadPanelItem();
     menuitem.Text = "Test";
     Radpanelbar1.Items.Add(menuitem);
     Radpanelbar1.ItemClick += new RadPanelBarEventHandler(Radpanelbar1_ItemClick); //to attach itemclick event
  }
  
void Radpanelbar1_ItemClick(object sender, RadPanelBarEventArgs e)
  {
       if (e.Item.Text == "Test")
       {
           //your code
       }
   }

Thanks,
Princy.
0
John ryan
Top achievements
Rank 1
answered on 08 Jun 2013, 01:52 AM
It works. thanks
0
John ryan
Top achievements
Rank 1
answered on 08 Jun 2013, 02:02 AM
Another question, if there is a way by which I can integrate my outlook mail in telerik control?if such, can you gave me  tips on how I can do it?

 thanks for you quick reply.
Tags
PanelBar
Asked by
John ryan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
John ryan
Top achievements
Rank 1
Share this question
or