|
-
Apr 29th, 2011, 04:32 AM
#1
Thread Starter
New Member
Add Button To DataGridView Cell
Hi,
I have a one column DataGridView that I use to display data from a database.
Is it possible add a command button to one of the cells in that column? I don't want a second column as a DataGridViewButtonColumn. I want the rows containing the database data and the command button row in the same column.
Also, if that is possible, I don't want the button's width to be the same as the column's width. Is it possible to manually set the width property?
Thanks for you help.
-
Apr 29th, 2011, 05:23 AM
#2
Re: Add Button To DataGridView Cell
There is no cell class that provides that functionality. If that's what you want then you're going to have to define your own custom cell class.
-
Apr 29th, 2011, 06:20 AM
#3
Thread Starter
New Member
Re: Add Button To DataGridView Cell
Thanks for your reply. Creating custom cells and column is something that certainly interests me, but unfortuately that is currently outside my skill level.
To create a cell class that contains a command button, I presume it would interit the DataGridViewCell, but I don't know where to begin to add the command button.
I don't want to take up too much of your time, but any instructions/sample code would be highly appreciated.
Thanks.
-
Apr 29th, 2011, 09:30 AM
#4
Re: Add Button To DataGridView Cell
In this example they create a custom DataGridViewCell that can host multiple RadioButtons.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|