Reputation: 421
HI,
I would like to make a control which look like a gantt charts or a audio sequencer...
But i don't know if i can use a datagrid for that.
In my mind, one of the grid column would be a "canvas" where i can drop controls and /or drag them to move inside...
It doesn't seem possible with native winform datagridview ... but i 've devexpress grid which is more powerfull (but i don't know if it can set canvas for column type)
One hard part is how to manage the width of the column to feel like it is infinite (no limit) .. is it possible with native control ??
("i wonder if wpf won't be better for that...")
Upvotes: 0
Views: 615
Reputation: 64467
WPF will likely be better for creating a control to host other controls, but it will be possible in WinForms also. To make use of a DataGridView
, you could look at creating a custom column handler:
http://msdn.microsoft.com/en-us/library/7tas5c80(VS.80).aspx
This doesn't solve your need to have a bar-like control that has interactive endpoints for resizing.
Update: To show custom content, you will need to paint it yourself. This is shown in this sample:
http://www.codeproject.com/KB/grid/DataGridColorPicker.aspx
I would suggest delegating the paint action to the bar control itself, providing just the arguments (most likely just the clip bounds).
Upvotes: 1