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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Input string was not in a correct format

Thread ID:





37026 Nov 15,2005 01:42 AM UTC Nov 15,2005 10:08 PM UTC WinForms 11
Tags: GridControl
Administrator [Syncfusion]
Asked On November 15, 2005 01:42 AM UTC

Hi, Whenever I repopulate my dataset and assigned to GRIDDATABOUNDGRID, I get the following message. “Input string was not in a correct format.” I use the following code to clear out my grid before I re-assign the dataset. this.gdbgDepartmentBudget.EnableAddNew = false; this.gdbgDepartmentBudget.BeginUpdate(); this.gdbgDepartmentBudget.DataSource = dsDepartmentBudgetDetail; this.gdbgDepartmentBudget.DataMember = null; this.gdbgDepartmentBudget.EndUpdate(); this.gdbgDepartmentBudget.Refresh(); What is the best way to show a empty grid with header row (Columns heading)? please do help!

Administrator [Syncfusion]
Replied On November 15, 2005 02:00 AM UTC

i get the error at line # 5 (last line) this.grid.DataSource = null; this.grid.DataMember = null; this.grid.Binder.GridBoundColumns.Clear(); this.grid.DataMember = "budgetExpenseCategory"; this.grid.DataSource = dsDepartmentBudgetDetail; please help! thanks,

Administrator [Syncfusion]
Replied On November 15, 2005 04:15 AM UTC

One thing that i forgot to mentioned is that my gdbg is using parent-child realtionship using data-realtion between data tables. Please do help me!

stanleyj [Syncfusion]
Replied On November 15, 2005 04:58 AM UTC

Hi Kishore, >> What is the best way to show a empty grid with header row (Columns heading)? A Blank table with column names will meet that criteria. Here is a sample showing that behavior. Let me know if you have any more questions. Best regards, Stanley

Administrator [Syncfusion]
Replied On November 15, 2005 05:53 PM UTC

Stanley, This is not exactly what i was looking for. Let say i my grid is displayed all the rows and as soon as I click on new button then I should see a blank grid with header row. Again if I click on load button then it should re-assign the data set to the grid. When I reassign the dataset I get the error message. I am using the following code. this.grid.datasource=null; this.grid.datasource=dsData; my grid is a hierarchical view. Thanks,

Administrator [Syncfusion]
Replied On November 15, 2005 06:18 PM UTC

Here is a little sample with 2 buttons. One displays a hierarchical grid, and the other clears it. This seems to work OK using version 3.3. What are you doing differently? http://www.syncfusion.com/Support/user/uploads/GDBG_Hier_993332a5.zip

Administrator [Syncfusion]
Replied On November 15, 2005 07:21 PM UTC

Please find the attached fil that contains the code that is being used to load and clear the grid. i get the message "Input string was not in a correct format." when i reassign the dataset with same data. Please help! Rick


Administrator [Syncfusion]
Replied On November 15, 2005 07:56 PM UTC

I think the following line is causing the problem but not sure. this.gridDataBoundGrid1.ShowTreeLines = true; any help?

Administrator [Syncfusion]
Replied On November 15, 2005 08:06 PM UTC

What version are you using? Did the sample work for you? Did you try doing things in the same order as the code that worked? For example, the code in the sample sets the dataSource and then the DataMember. Your code sets it in the opposite order. You also might try setting the DataSource/DisplayMember ro null before you try getting the new DataSource( setting dsDepartmentDetail= Business.Registry.DepartmentService.GetDepartmentDetail(this.department.DepartmentNo) If you can upload a sample project showing the problem, we can try to suggest a solution.

Administrator [Syncfusion]
Replied On November 15, 2005 09:14 PM UTC

I am using we can''t upgrade at this point. is this the problem?

Administrator [Syncfusion]
Replied On November 15, 2005 09:17 PM UTC

I am sure this.grid.ShowTreeLines = true; is the main reason. but Ifi add into your sample it doesn''t create any problem is it a version issue?

Administrator [Syncfusion]
Replied On November 15, 2005 10:08 PM UTC

It could possibly be something we have addressed in later releases but I do not know that for sure. The string "Input string was not in a correct format" does not appear in our grid code base, so I suspect it is coming from the framework. If you set VS to break on exception, is there an exception raised before you get this message? If so, what call stack do you get? If you own our source code, you can use a debug build to be able to look at our source code and see if that would give any hint as to how to avoid this problem.


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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