今すぐお試しください!

製品の詳細CData ADO.NET Provider for Garoon を確認して、無償評価版をダウンロード:

今すぐダウンロード

DataBind Garoon Data to the DevExpress Data Grid

Use the CData ADO.NET Provider for Garoon with the DevExpress Windows Forms and Web controls to provide Garoon data to a chart.

The CData ADO.NET Provider for Garoon implements standard ADO.NET data access components that can be used with third-party controls. The standard ADO.NET process for databinding can be followed to enable bidirectional access to live data from UI controls. In this article we show how to use the CData components to databind to the DevExpress Windows Forms and Web controls; you will databind to a chart that displays current data.

Garoon への認証は、パスワード認証、Basic 認証、クライアントSSL をサポートしています。

パスワード認証

Garoon への認証には、以下を設定する必要があります。

  • Url:アカウントのURL。
  • User:アカウントのユーザー名。
  • Password:アカウントのパスワード。

Basic 認証

Basic 認証セキュリティ機能がドメインに設定されている場合は、BasicAuthUser とBasicAuthPassword の追加ログイン資格情報を指定します。Basic 認証ではUser とPassword に加えて、これらのクレデンシャルが必要です。

クライアントSSL

Basic 認証の代わりに、クライアント証明書を指定して本製品を認証できます。 SSLClientCert、SSLClientCertType、 SSLClientCertSubject、 およびSSLClientCertPassword を設定します。 さらに、User とPassword をGaroon のログイン資格情報に設定します。

Windows Forms Controls

The code below shows how to populate a DevExpress chart with Garoon data. The GaroonDataAdapter binds to the Series property of the chart control. The Diagram property of the control defines the x- and y-axes as the column names.

using (GaroonConnection connection = new GaroonConnection( "User=myuseraccount;Password=mypassword;Url=http://subdomain.domain.com;")) { GaroonDataAdapter dataAdapter = new GaroonDataAdapter( "SELECT Id, EventMenu FROM Events", connection); DataTable table = new DataTable(); dataAdapter.Fill(table); DevExpress.XtraCharts.Series series = new DevExpress.XtraCharts.Series(); chartControl1.Series.Add(series); series.DataSource = table; series.ValueDataMembers.AddRange(new string[] { "EventMenu" }); series.ArgumentScaleType = DevExpress.XtraCharts.ScaleType.Qualitative; series.ArgumentDataMember = "Id"; series.ValueScaleType = DevExpress.XtraCharts.ScaleType.Numerical; chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False; ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true; }

Web Controls

The code below shows how to populate a DevExpress Web control with Garoon data. The GaroonDataAdapter binds to the Series property of the chart; the Diagram property defines the x- and y-axes as the column names.

using DevExpress.XtraCharts; using (GaroonConnection connection = new GaroonConnection( "User=myuseraccount;Password=mypassword;Url=http://subdomain.domain.com;")) { GaroonDataAdapter GaroonDataAdapter1 = new GaroonDataAdapter("SELECT Id, EventMenu FROM Events", connection); DataTable table = new DataTable(); GaroonDataAdapter1.Fill(table); DevExpress.XtraCharts.Series series = new Series("Series1", ViewType.Bar); WebChartControl1.Series.Add(series); series.DataSource = table; series.ValueDataMembers.AddRange(new string[] { "EventMenu" }); series.ArgumentScaleType = ScaleType.Qualitative; series.ArgumentDataMember = "Id"; series.ValueScaleType = ScaleType.Numerical; ((DevExpress.XtraCharts.SideBySideBarSeriesView)series.View).ColorEach = true; }
 
 
ダウンロード