Problem with THE DATAGRIDVIEW....

dualshock03

Well-known member
Joined
Jan 28, 2007
Messages
105
Programming Experience
1-3
hello again, i have problem regarding this DataGridView as usual, Im using this Grid with a default of 3 columns and no rows, then connected to a MySQL database at runtime, The mess is..., i can connect the data to the Grid but it shows a new 3 columns with the data fields next to the 3 columns that i have made during editing in vb.NET. what's the ryt code for this??

Another thing is, how can i make a certain column-type in DatagridView to be a Link-column if the control is Data-bound? Hope u all understand my problem..thnx again!!
 
Last edited:
DataGridView.AutoGenerateColumns = False

But if your problem is that you have made the columns in design but they dont have any data when you run the app then it is to do with the DataPropertyName not being set correctly

Ive never used link columns, but I'd imagine that there is one link click handler for the whole column, and you jsut get the cell that was clicked and do something with that
 
DataGridView: creating a custom column-type

thnx cjard! it worked already.. but i have a new problem again with this grid..

I have read this statement in a particular website:

moz-screenshot.jpg
"You can create your own column class by inheriting the DataGridViewColumn class or any of its derived classes to provide custom appearance, behavior, or hosted controls. For more information, see How to: Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their Behavior and Appearance"

How can i create this kind of custom column-type? I want a Column-type that pops-up a table/or some kind of new Grid sideways to the right.., do u know the code for this?
 
can you make do with a combo?

I dont make custom controls.. I generally figure on the thinking that if I cant do it with microsoft's standard controls, there;s something wrong with my design.

An exception to that, is the excellent Tree/Grid component (written by someone else) in my mp3 software.. I found it a worthy purchase because its a beatiful way of showing info that exists in a hierarchy but always has the same info...
 
Back
Top