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.

Can anyone tell me why I have no columns?

Thread ID:

Created:

Updated:

Platform:

Replies:

8376 Nov 4,2003 07:57 AM Nov 4,2003 12:02 PM Windows Forms 2
loading
Tags: GridControl
Brian Bacon
Asked On November 4, 2003 07:57 AM

Hello, I am using a GridDataBoundGrid Control. I have a component that provides my forms with adapters. I have a nice typed dataset. I create a panel, drop the grid, my database component and the dataset on it. I set the datasource of the grid and I have myc columns displayed nicely. I then go about setting the grid up to run how I'd like it. Now, I save my grid panel. I drop it on another form. I have no columns in design mode. Here is the code that is crashing: Dim columns As GridBoundColumnsCollection = CType(Me.gridBinder.InternalColumns.Clone(), GridBoundColumnsCollection) columns("Quantity").HeaderText = "Qty" In my grid panel this works fine, but when I drop the panel on another form columns() is empty. Can anyone tell me why?

Administrator [Syncfusion]
Replied On November 4, 2003 10:59 AM

When you say you create a panel, drop a grid on it, etc, and then save it, are you creating this panel on a form? If so, how are you trying to use it on another form? Are you copying and pasteing? If so, I think you will also have to copy and paste your database components as well. Instead of a panel, you could use a userControl, and then drop this userControl on other forms from your toolbox. In this case, I think your database components would be available as part of the user control. If I misunderstood what you are trying, if you will explain things some more, maybe we could suggest something.

Brian Bacon
Replied On November 4, 2003 12:02 PM

When I say I am creating a panel, I mean I am creating a UserControl and then changing it's base class to Panel (because XpTaskBar doesnt accept UserControls). I did however find the problem and it was entirely my fault. I was falling back on a bad connection string. I'm trying to work exactly like you suggest the only difference is that I'm a panel instead of a UserControl because sometimes I'm hosted on a form and sometimes I'm hosting within an XpTaskBar.

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.

;