We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How can i make chart and gird by using SqlDataSource

Thread ID:





124787 Jun 30,2016 05:38 AM UTC Jun 30,2016 12:53 PM UTC ASP.NET Web Forms 1
Tags: Chart
Asked On June 30, 2016 05:38 AM UTC

I made a chart and a grid by using SqlDataSource . But it can't move on browser.

please look following my source cord. How can i make chart and grid by  using SqlDataSource.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="linechart2.aspx.cs" Inherits="SyncfusionASPNETApplication1.linechart2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>&nbsp;<body><form id="form1" runat="server">

        <ej:WaitingPopup runat="server" ID="waitingpopup" ShowOnInit="false"></ej:WaitingPopup>
        <ej:Grid ID="Grid1" runat="server" DataMember="DefaultView" DataSourceCachingMode="None" DataSourceID="sample" MinWidth="0">
<ContextMenuSettings CustomContextMenuItem="(コレクション)" EnableContextMenu="True"></ContextMenuSettings>

                <ej:Column DataType="number" Field="day" IsPrimaryKey="True">
                <ej:Column DataType="number" Field="volume">

<PageSettings Template=""></PageSettings>

<RowDropSettings DropTargetID="" DropMapper=""></RowDropSettings>

<ScrollSettings EnableTouchScroll="False"></ScrollSettings>
        <ej:Chart ID="Chart1" runat="server" DataSourceID="sample" Width="900" Height="600" SeriesType="Column" Text="Product Details">
            <PrimaryXAxis  LabelIntersectAction="Trim"></PrimaryXAxis>
            <CommonSeriesOptions Tooltip-Visible="true" />
                <ej:Series Name="UnitPrice" XName="day" YName="volume" Type="Bar"></ej:Series>
            <Title Text="Product Details"></Title>
        <asp:SqlDataSource ID="sample" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [Table]"></asp:SqlDataSource>
    <br />

Thank you for your help

Dharanidharan Dharmasivam [Syncfusion]
Replied On June 30, 2016 12:53 PM UTC

Hi Kyousuke, 
Thanks for using the Syncfusion product. 
Based on your requirement, we have created a sample with grid and chart using SqlDataSource. For your reference, we have attached the sample, kindly find the sample from the attachment. Please find the screenshot below. 

For more information about SqlDatsource with grid,  please refer to the below Help document. 

Online demo: 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon