Input string was not in a correct format.Error data binding.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Solutions Gallery BV
Newbie
Newbie
Posts: 25
Joined: Thu Dec 27, 2007 12:00 am

Input string was not in a correct format.Error data binding.

Post by Solutions Gallery BV » 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.

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)
                    {

                    }
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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 12, 2008 9:38 am

Hi Solutions Gallery BV,

Could you please try doing as in the example Christopher Ireland posted here?

If the problem persists, could you please post or send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
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.
Ok, I'll add your request to our wish-list to be included in future versions. You may also be interested in the instructions for using TeeChart using BindingSource I posted at this thread.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply