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

Telerik.WebControls.RadChart.Series.Count

1 Answer 57 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Özgür
Top achievements
Rank 1
Özgür asked on 31 Jan 2008, 12:42 PM
if i bind a DataTable that has 2 rows to
Telerik.WebControls.RadChart,
Telerik.WebControls.RadChart.Series.Count will be 2
but if i bind a DataTable that has 1 row to
Telerik.WebControls.RadChart,
Telerik.WebControls.RadChart.Series.Count will be 0. why?

1 Answer, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 31 Jan 2008, 02:29 PM
Hi Özgür,

We are unable to reproduce the described behavior with the following code:

protected void Page_Load(object sender, EventArgs e) 
    RadChart chart = new RadChart(); 
    chart.ID = "chart1"
    this.Form.Controls.Add(chart); 
 
    DataTable table = new DataTable(); 
    table.Columns.Add("MyCol", typeof(int)); 
 
    DataRow row = table.NewRow(); 
    row["MyCol"] = 1; 
    table.Rows.Add(row); 
 
    DataRow row2 = table.NewRow(); 
    row2["MyCol"] = 2; 
    table.Rows.Add(row2); 
 
    DataRow row3 = table.NewRow(); 
    row3["MyCol"] = 3; 
    table.Rows.Add(row3); 
 
    chart.DataSource = table
    chart.DataBind(); 
 
    Response.Write(chart.Series.Count); 
}  

Let us know how it goes.


Regards,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Özgür
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Share this question
or