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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Holy cow data binding is freakn'' hard

Thread ID:

Created:

Updated:

Platform:

Replies:

68477 Sep 23,2007 03:38 AM UTC Sep 25,2007 04:44 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: Chart
Rudy Rosa
Asked On September 23, 2007 03:38 AM UTC

Evaluation copy of 5.1 - I am trying to bind data from a dataset and its freakn' confusing the hell out of me.

I am following this sample to a "T"
http://websamples.syncfusion.com/docs/chart/ug/DataBinding.html

WHAT IS THE "TRICK" to get this to work!?!?!

DataSet set = new DataSet();

SqlDataAdapter sa = new SqlDataAdapter(cmd);
sa.Fill(set, "Projects");

ChartDataBindModel model = null;

ChartDataBindAxisLabelModel xAxisLabelModel = null;

model = new ChartDataBindModel(set, "Projects");

// The column that contains the X values.

model.XName = "ID";

// The columns that contain the Y values.

model.YNames = new string[] { "Population" };

ChartSeries series = this.ChartWebControl1.Model.NewSeries("Data Bound Series");
series.Text = series.Name;
series.SeriesModelImpl = model;

series.Style.TextColor = System.Drawing.Color.White;
series.Style.Font.Bold = true;

this.ChartWebControl1.Series.Add(series);

xAxisLabelModel = new ChartDataBindAxisLabelModel(set, "Projects");

// The columns that has the label values for the corresponding X values.

xAxisLabelModel.LabelName = "City";

ChartWebControl1.PrimaryXAxis.LabelsImpl = xAxisLabelModel;
ChartWebControl1.PrimaryXAxis.ValueType = ChartValueType.Custom;

wtf.zip

Suresh Sekarean [Syncfusion]
Replied On September 25, 2007 04:44 PM UTC

Hi Rudy,

Based on the screenshot, Please check the LabelName property of ChartDataBindModel. This property should be set with the column name of the DataTable.

Please refer our Browser sample which illustrates the Microsoft Access Databinding in the below location,

Essential Chart -> Importing ->Data From DataBase

Online -http://www2.syncfusion.com//syncfusion/infrastructure/samplebrowserasp/samples.aspx?version=2_0

Kindly provide us with the sample project if you still facing this issue.

Thanks for using Syncfusion products.

Thanks,
Sureshsekaran.

CONFIRMATION

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.

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

;