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.

Holy cow data binding is freakn'' hard

Thread ID:





68477 Sep 22,2007 11:38 PM Sep 25,2007 12:44 PM ASP.NET Web Forms (Classic) 1
Tags: Chart
Rudy Rosa
Asked On September 22, 2007 11:38 PM

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"

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;


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;


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

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.



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.

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.