473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

DataGridView UserControl help

I created a UserControl that has a DataGridView. I want to make
the .Columns property of the DataGridView available from the
UserControl when it is placed on a form. Since it's readonly I made
the property code readonly. See below...

<Browsable(True), Description("")_
Public ReadOnly Property Columns() As
System.Windows.Forms.DataGridViewColumnCollection
Get
Return DataGridView1.Columns
End Get
End Property

So when I attempt to create the columns in an instance of my
UserControl on a form it works. However, when I close the form
Designer and then open it back up, the columns are gone.

Does anyone have any ideas?

Jun 8 '07 #1
0 1104

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bob | last post by:
Thinking two things, 1- Creating a userControl -yeah you guessed it, a multi column drop down combobox - I've looked at several articles and did not find what I need, one that's bindable and that...
0
by: MajorTom | last post by:
Hello I am creating a UserControl that has a DataGridView control as a member. I want to expose the column collection of the DataGridView, as a property of my control. in my code I have:
0
by: osmarjunior | last post by:
Hi. I have a UserControl with a DataGridView and 3 buttons (New, Edit and Delete) inside. I wanna do something like that: when the focus leaves the UserControl, it hides the selection of the...
3
by: Johnny E. Jensen | last post by:
Hello Dot sure if this it the right group but here goes. I'am using the DataGridView multiple times in my application, and then i'll read a book on inherience, and that opend a new world for...
0
by: Paul | last post by:
I'm creating a UserControl that uses a DataGridView in virtual mode. It was working fine other than a few bugs. After I fixed those few bugs, I broke it. I have a cache of 50 records. The...
2
by: Lloyd Sheen | last post by:
I add a DataGridView to a new form. Then click the tasks icon, then attempt to select datasource. I get an error "Error using the dropdown: Object reference not set to an instance of an object"....
0
by: kea62227 | last post by:
I need to present some data. The obvious way is to use a datagridview, but I would like to make it presented better. Therefore I have created a usercontrol that presents a row of data more...
4
by: Frederik | last post by:
Hi all, Can someone tell me how I can host a LinkLabel in a DataGridView (the existing DataGridViewLinkColumn does not provide what I need). Do I need to derive from DataGridViewTextBoxCell or...
0
by: Peted | last post by:
Hello, Ive got a datagridview, on a splitcontainer, in a system.windows.forms.usercontrol. The datagrid view by default shows 3 colums of data and fills exactly the size of the user control...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.