- Home
- Forum
- ASP.NET Web Forms
- How can i make chart and gird by using SqlDataSource
How can i make chart and gird by using SqlDataSource
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"/>
<title></title>
</head> <body><form id="form1" runat="server">
<div>
</div>
<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>
<Columns>
<ej:Column DataType="number" Field="day" IsPrimaryKey="True">
</ej:Column>
<ej:Column DataType="number" Field="volume">
</ej:Column>
</Columns>
<PageSettings Template=""></PageSettings>
<RowDropSettings DropTargetID="" DropMapper=""></RowDropSettings>
<ScrollSettings EnableTouchScroll="False"></ScrollSettings>
</ej:Grid>
<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" />
<Series>
<ej:Series Name="UnitPrice" XName="day" YName="volume" Type="Bar"></ej:Series>
</Series>
<Title Text="Product Details"></Title>
</ej:Chart>
<asp:SqlDataSource ID="sample" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [Table]"></asp:SqlDataSource>
<br />
</form>
</body>
</html>
Thank you for your help
Regards
kyousuke
SIGN IN To post a reply.
1 Reply
DD
Dharanidharan Dharmasivam
Syncfusion Team
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.
Screenshot:
For more information about SqlDatsource with grid, please refer to the below Help document.
Online demo:
Sample Link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/SyncfusionASPNETApplication7-5785837131908514937.zip
Thanks,
Dharani.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
KY kyousuke
- Jun 30, 2016 05:38 AM UTC
- Jun 30, 2016 12:53 PM UTC