RadHtmlChart Showing Odd Behaviour with DataSource from StroedProcedure

2 posts, 0 answers
  1. Tilo
    Tilo avatar
    1 posts
    Member since:
    Dec 2014

    Posted 30 Jul 2015 Link to this post

    Hi All,

    I have a crazy behaviour on my RadHtmlChart. It has a DataSource coming from a stored procedure. This procedure accepts two parameters provided by RadDropDowns (@DateID and @Group).

    I choose a @DateID from DropDown 1 , a @Group from DropDown2 and Invoke the Databind by clicking the Filter Button. Hence the RadHtmlChart gets the Data from the stored Procedure and renders Columns as expected. Furthermore a RadGrid is included to display the same data from the DataSource. (Image V1)

    However, if the parameter @Group includes an item starting with letter 'U', the RadChart is not rendered and even blocks others from showing.(Image V2)

    I really tried out everything, but RadChart is not rendered correctly whenever any item with an 'U' is included.

    AnyOne any idea what the reason for this crazy behaviour might be?


  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 31 Jul 2015 Link to this post

    Hello Tilo,

    I have already replied to the support ticket that was opened by you on the matter, so that I paste my answer there for the community:

    Most probably there is something wrong with the returned data. Can you please try to extract this chart's data source and then provide it back to us, so that we can make an examination?

    The easiest and fastest way to export the chart data source is to utilize the client-side API. For example:
    Copy Code

    You can also export the data source on the server-side - convert SqlDataSource to a DataTable data source and then extracted it to an XML file.

    Copy Code
    protected void Page_Load(object sender, EventArgs e)
        //How to convert the SQLDataSource to a DataTable:
        //DataSourceSelectArguments args = new DataSourceSelectArguments();
        //DataView view = (DataView)SQLDataSource1.Select(args);
        //DataTable dt = view.ToTable();
        DataTable dt = GetData();
        RadHtmlChart1.DataSource = dt;
        ExportDataTableToXMLFile(dt, @"C:\Work\TWS\Helpers\myXMLDS.xml", "myDataTableName");
    protected void ExportDataTableToXMLFile(DataTable dt, string exportFileName, string DataTableName)
        if (dt.TableName == "")
            dt.TableName = DataTableName;
        for (int i = 0; i < dt.Columns.Count; i++)
            dt.Columns[i].ColumnMapping = MappingType.Attribute;

    Danail Vasilev
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top