Chart Grid in GridTemplate Column

Thread is closed for posting
2 posts, 0 answers
  1. Seema Geevarghese
    Seema Geevarghese avatar
    5 posts
    Member since:
    Apr 2009

    Posted 29 Jun 2011 Link to this post

    Hi,

    I am using this link for your example for chart to embed RadChart instances in template column of RadGrid.
    http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandchart/chartingrid/defaultvb.aspx?product=chart

                   I am using VS 2010 and ADO.net entity data model and EntityDatasource instead of sqldatasource, the issue is chart is not being rendered for all roows except the last one.. I am getting an error at the statement  chart.DataSource = SqlDataSource2.Select(DataSourceSelectArguments.Empty) 'Value of type system.web.ui.DataSourceSelectArguments cannot be converted to integer.

    What i use is  chart.DataSource = EntitylDataSource2.Select(DataSourceSelectArguments.Empty).
     The chart for the  last row of the grid  is displayed only, can you please advise?  Please see the result attached when I use

     

    EntityDataSource2.WhereParameters(0).DefaultValue = item.GetDataKeyValue("Entity1").ToString()
                chart.DataSourceID = "EntityDataSource2"
                Commented out'chart.DataSource = EntityDataSource2.Select(DataSourceSelectArguments.Empty)

    Here is my definition of EntityDataSource2

     

    <asp:EntityDataSource ID="EntityDataSource2" runat="server" 
                ConnectionString="name=TEntities" DefaultContainerName="TEntities"
                EnableFlattening="False" EntitySetName="Entities" 
                            
                Select="it.[Entity1], it.[Type], it.[Entity_Desc], it.[Active], it.[Cnt], it.[Dataupdtthru]" 
                EntityTypeFilter="" OrderBy="it.[Entity1]"     Where="it.[Entity1] = @Entity">
              
    <WhereParameters>
        <asp:Parameter  DbType="string"   Name="Entity"  />
     </WhereParameters>
      </asp:EntityDataSource>




     

     

  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 04 Jul 2011 Link to this post

    Hi Seema,

    From the information supplied, it seems that the charts (except the last one) do not receive any data from the datasource. To test where the source of the issue is, you can remove the Where clause for the datasource, thus ensuring that it always returns data, and see if all charts are populated.
    Also, can you provide some additional information on the datasource used. Do you use one datasource for all charts? How do you setup the parameter?
    Also, the best option would be for you to send us a small working sample, demonstrating your setup, and showing the unwanted behavior. We will debug it locally, and advise you further.

    Greetings,
    Yavor
    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.

Back to Top