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.

GDBG binding error

Thread ID:





17226 Aug 4,2004 01:43 AM Aug 4,2004 04:20 AM Windows Forms 2
Tags: GridControl
Mick Speake
Asked On August 4, 2004 01:43 AM

I have code like the following :- grid.DataSource=table (an ADO.Net DataTable) grid.Binder.InternalColumns[0].HeaderText="some text"; This has been working fine until now when it generates a system OutOfRangeException ("Index was out of range"). Looking in debug the Binder.InternalColumns collection is empty. I know the DataTable contains valid data. Am I doing something wrong? I thought that assigning a DataSource to the grid caused it to automatically bind to all the columns in the DataSource. Is this not correct? I have purchased the source code - what do I have to do to trace into the source? Regards, Mick

Administrator [Syncfusion]
Replied On August 4, 2004 02:10 AM

As long as you are not using hiearchical data (added Relations to the dataSet.Relations collection), and have not explicitly added GridBoundColumns, then grid.Binder.InternalColumn should be populated after setting the grid.DataSource to a DataTable provided the DataTable has columns in it. If it is empty under these conditions, then either it was reset for some reason, or was somehow never set. You might look in your output window to see if any exceptions are thrown during the code that tries to set up the DataSource and set it to the grid. You also might place a stop on the code that sets the DataSouorce to the grid to make sure it is being hit. As far as a using a debug build of our libraries, the simplest way is to run our Assembly Maanger (from the Syncfusion portion of the Start Menu). It will let you select a debug build (click force rebuild if it is not selected). This will do everything for you, building the libraries and setting them into teh GAC. Then later you can run the Assembly Manager to go back to using the prebuilt default libraries.

Mick Speake
Replied On August 4, 2004 04:20 AM

Clay, Thanks for your reply. For your information, I resolved the problem as follows:- By stepping into the grid source code I found that the binder.BindingContext had not been set. This was caused by the .Net designer "losing" the fact that the grid control was on a panel. Having spent a few weeks trying to convert a C++/MFC app to c# and staggering from problem to problem, I wonder if it is worth the effort!


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.