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.