BA
Balavasanth
Syncfusion Team
September 22, 2009 06:52 AM UTC
Hi Barry,
Thanks for your interests in Syncfusion products.
You can make use of the GroupBarItemSelected event which occurs when a GroupBar Item of the GroupBar control is selected.
Accessing the GroupBar.SelectedItem property from within the GroupBarItemSelected event handler will allow you to determine the item that was clicked. Based on this appropriate command, handling routines can be invoked.
[C# Code]
// Provide a handler for the GroupBar.GroupBarItemSelected event.
this.groupBar1.GroupBarItemSelected += new System.EventHandler(this.groupBar1_GroupBarItemSelected);
//The GroupBar.SelectedItem property fetches the index of the selected item, while the item is obtained by referencing the selected index within the GroupBar.GroupBarItems collection.
private void groupBar1_GroupBarItemSelected(object sender, System.EventArgs e)
{
Console.WriteLine(String.Concat("Selected Item = ", this.groupBar1.GroupBarItems[this.groupBar1.SelectedItem].Text));
}
Based on the selected Groupbar item you can perform the action.
Please let us know if you have any queries.
Best,
Bala.