Telerik.WebControls.RadChart.Series.Count

Thread is closed for posting
2 posts, 0 answers
  1. Özgür
    Özgür avatar
    1 posts
    Member since:
    Jan 2008

    Posted 31 Jan 2008 Link to this post

    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?
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 31 Jan 2008 Link to this post

    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
Back to Top