Object Properties use in DataField

2 posts, 0 answers
  1. Rob
    Rob avatar
    27 posts
    Member since:
    Oct 2012

    Posted 25 Oct 2012 Link to this post

    While working with a column series of the RadHTMLChart, I noted that the reference used in the DataField can not have accessed properties/members.  For example, I wanted to referenced a TimeSpan's object TotalHours as "Time.TotalHours" but it did not work.  Is this intended?  Do you plan to change this in line with other controls?

  2. Marin Bratanov
    Marin Bratanov avatar
    5899 posts

    Posted 26 Oct 2012 Link to this post

    Hi Rob,

    I am not sure I completely understand the problem. Are you referring to the cilent-side or server-side datasource object?

    What the chart uses is a simple list of JSON objects (i.e. no deep nesting of objects inside a field of the original object) on the client and thus a simple datatable on the client. The DataFieldY property points to a column name and the code-behind takes the value stored in that column, so it has to be either a string for labels, or a number for values, or boolean for ExplodeField in a PieChart.

    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top