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.

Input string was not in a correct format

Thread ID:

Created:

Updated:

Platform:

Replies:

37026 Nov 14,2005 08:42 PM Nov 15,2005 05:08 PM Windows Forms 11
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 14, 2005 08:42 PM

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 14, 2005 09:00 PM

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 14, 2005 11:15 PM

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 14, 2005 11:58 PM

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 12:53 PM

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 01:18 PM

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 02:21 PM

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

gridcode.zip

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

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 03:06 PM

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 04:14 PM

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

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

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 05:08 PM

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.

CONFIRMATION

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.

;