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

How can use ScrollMode when chart data bounded programmatically?

1 Answer 71 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
mastermehdi
Top achievements
Rank 2
mastermehdi asked on 24 Jun 2011, 07:13 AM
hi
How can use ScrollMode when chart data bounded programmatically?
my c# code is look like this:
protected void Page_Load(object sender, EventArgs e)
{
    ConnectionStringSettings connectionString = ConfigurationManager.ConnectionStrings["database"];
    SqlConnection connection = new SqlConnection(connectionString.ConnectionString);
    SqlCommand command = new SqlCommand("selectDetails", connection);
    command.CommandType = CommandType.StoredProcedure;
    SqlDataAdapter dataAdapter = new SqlDataAdapter();
    dataAdapter.SelectCommand = command;
    DataSet dataSet = new DataSet();
    dataAdapter.Fill(dataSet, "info");
    chart.ClientSettings.EnableZoom = true;
    chart.ClientSettings.ScrollMode = Telerik.Web.UI.ChartClientScrollMode.XOnly;
    chart.DataSource = dataSet.Tables["info"];
    chart.DataBind();
}

but I get this exception:
Object reference not set to an instance of an object. 
 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
 Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
  
Source Error: 
 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 
  
  
Stack Trace: 
  
[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.ScriptObjectBuilder.RegisterCssReferences(Control control) +182
   Telerik.Web.UI.RadChart.OnPreRender(EventArgs e) +61
   System.Web.UI.Control.PreRenderRecursiveInternal() +103
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Control.PreRenderRecursiveInternal() +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496
  
  
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.225

any body can help me?














1 Answer, 1 is accepted

Sort by
0
Accepted
Ves
Telerik team
answered on 29 Jun 2011, 12:41 PM
Hi,

We were not able to reproduce the problem. Please, find attached a small example, based on the code you have provided. It works correctly on our end. Can you please modify it, so that it matches your scenario and the issue is reproduced? Then you can send it back to us for investigation. Thank you.

Kind regards,
Ves
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Chart (Obsolete)
Asked by
mastermehdi
Top achievements
Rank 2
Answers by
Ves
Telerik team
Share this question
or