Input string was not in a correct format.Error data binding.
Posted: Mon Feb 11, 2008 9:16 am
Hi,
I have 1 .Net DataTable and this table have 2 column like a
(type string) , (type int)
NAME , Value
ABC , 112
DEF , 255
GHI , 315
JKL , 95
When i try to bind series from datatable. Getting "Input string was not in a correct format." error.
And i want to say/ask something. This chart is very porfessional tool. But Tutorials and Helps is not like. How many developer using ADO.Net Data Adapter Wizard or FillSampleValue(10). Please add professinal bindings Sample to Tutorials etc.
Thank you.
I have 1 .Net DataTable and this table have 2 column like a
(type string) , (type int)
NAME , Value
ABC , 112
DEF , 255
GHI , 315
JKL , 95
When i try to bind series from datatable. Getting "Input string was not in a correct format." error.
Code: Select all
Steema.TeeChart.Styles.Pie oPieSeries = new Steema.TeeChart.Styles.Pie();
oPieSeries.XValues.DataMember = sXValueDataMember;
oPieSeries.XValues.DateTime = isXValueDate;
oPieSeries.YValues.DataMember = sYValueDataMember;
oPieSeries.Transparency = int.Parse(sTransparency);
oPieSeries.Title = sSeriesName;
oPieSeries.Color = SeriesColor;
oPieSeries.Marks.Visible = bool.Parse(sMarksVisible);
oPieSeries.Marks.Transparency = int.Parse(sMarksTransparency);
oPieSeries.Marks.Font.Size = int.Parse(sMarksFontSize);
oPieSeries.ColorEach = bool.Parse(sisColorEach);
oPieSeries.Circled = true;
oPieSeries.Pen.Visible = true;
oPieSeries.DefaultNullValue = 0;
if (sAxisPenWidth != "0") oPieSeries.CustomVertAxis = axis1;
try
{
oPieSeries.DataSource = oData; //<<<Error at here
ch1.Series.Add(oPieSeries);
}
catch (Exception)
{
}
Thank you.