Click here to Skip to main content
15,884,605 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Suppose i want to add a control( or user control) to a datagridview. after specifing its geometry, i can do this:
C#
datagridview1.Controls.Add(usercontrol);


But i want to do this to a DataGridViewColumn. How can i do that? (There is nothing like a 'Controls' property)
Posted

If I understood the question correctly, you want to create a custom column in your DataGridView. If that's correct, then maybe this would help: Create a Custom DataGridView Column[^]
 
Share this answer
 
Comments
alizadeh91 28-Dec-11 16:13pm    
No, i know how to create custom datagridview column. I just want to add a control to datagridviewcolumn
ARBebopKid 28-Dec-11 17:59pm    
Are you trying to add it to the Header cell or for each detail cell?
DataGridView.Controls.add(control);
 
Share this answer
 
Must rewrite datagridviewcolumn! I can give to you the code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900