Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using C# to develop a Custom DatagridViewColumn.
I have a datagridviewcolumn which has a datetime column.
When the datagridview is displayed i would like the cell to be displayed as a user control.
The user control has a couple of textboxes for each of the date components(txtbox for day, txtbox for month etc.).
The user control works fine. but the problem is i want to change the datagridtextboxcell to the user control
when loading the data.All the exmaples on the web point to the initializeeditevent but i want the datagridcolumn
to show as a user controlwhen form is loaaded rather than in edit mode.
How can i do this by creating a custom datagridviewcolumn control for this?
Posted

1 solution

Instead of making DatagridViewColumn itself to usercontrol. Why are you not trying to inject the seperate DateComponent UserControl inside the DatagridViewColumn.
You can very well inject any control inside the cell.
 
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