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

How many data series I have in a RadChart ?

2 Answers 17 Views
Chart
This is a migrated thread and some comments may be shown as answers.
MahMah
Top achievements
Rank 1
MahMah asked on 09 Jan 2012, 02:12 PM
Hi,

I want to disable some buttons when I have more that one dataseries in the chart. So I have chosen DataBound event of chart. But I can not access to number of dataseries which was loaded into grid at that moment. I have seen number of data series in some private properties of chart by using Quick Watch window but I can not see in public ones (number of data series).

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Petar Marchev
Telerik team
answered on 12 Jan 2012, 10:15 AM
Hi,

void radChart_DataBound(object sender, Telerik.Windows.Controls.Charting.ChartDataBoundEventArgs e)
{
   var count = this.radChart.SeriesMappings.Count; //((Telerik.Windows.Controls.RadChart)(sender)).SeriesMappings.Count
}

I think this is what you are looking for.

Note that if the count is 0 than you must be using the default series definition.

Regards,
Petar Marchev
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
MahMah
Top achievements
Rank 1
answered on 12 Jan 2012, 10:28 AM
Hi Petar,

Thank you for your support.

You are correct and the problem was that I expected to see all data mappings in the first DataBound occurrence but it was called as much as the number of series and I should had been patient to see the other series at the further DataBound calls.

Regards.
Tags
Chart
Asked by
MahMah
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
MahMah
Top achievements
Rank 1
Share this question
or