or
| private int selectedIndex; | |
| public TEST() | |
| { | |
| InitializeComponent(); | |
| } | |
| private void radListBox1_SelectedIndexChanged(object sender, EventArgs e) | |
| { | |
| int newIndex = radListBox1.SelectedIndex; | |
| if (newIndex == selectedIndex) | |
| { | |
| DeselectAllElements(); | |
| } | |
| else | |
| { | |
| selectedIndex = newIndex; | |
| } | |
| } | |
| public void DeselectAllElements() | |
| { | |
| radListBox1.ClearSelected(); | |
| radListBox1.SelectedIndex = -1; | |
| selectedIndex = -1; | |
| } | |
| private void TEST_Load(object sender, EventArgs e) | |
| { | |
| string[] list = "blah1,blah2,blah4,blah5,blah6".Split(','); | |
| radListBox1.DataSource = list; | |
| } |
foreach
(ChartSeries collection in chart.Series){
foreach (ChartSeriesItem item in collection.Items
{
item.ActiveRegion.Click += new RegionClickEventHandler(ActiveRegion_Click);
}
}
protected void ActiveRegion_Click(object sender)
{
ChartSeriesItem item = (ChartSeriesItem)sender;
item.ActiveRegion.Tooltip = item.Parent.Name;
//MessageBox.Show(item.Parent.Name);
}
error:Error 212 No overload for 'ActiveRegion_Click' matches delegate 'Telerik.Charting.RegionClickEventHandler'