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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can anyone tell me why I have no columns?

Thread ID:





8376 Nov 4,2003 12:57 PM UTC Nov 4,2003 05:02 PM UTC WinForms 2
Tags: GridControl
Brian Bacon
Asked On November 4, 2003 12:57 PM UTC

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 03:59 PM UTC

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 05:02 PM UTC

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.


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon