Is it possible to include in a column a progress bar in a ListView control?
What about in a DataGridView?
using .NET 2.0.
if so - how? :)
Printable View
Is it possible to include in a column a progress bar in a ListView control?
What about in a DataGridView?
using .NET 2.0.
if so - how? :)
This link may help you out:
http://forums.microsoft.com/MSDN/Sho...76890&SiteID=1
Thanks
very difficult to follow! lol. Or im having a bad day....
is there another way?
You can embed any control you like in a DataGridView as it's been designed from the ground up to support that. The thing is, most controls embedded in a DataGridView are for editing the contents of a cell. With a ProgressBar there will be no in-place editing, so you don't need any actual Progressbar controls.
Normally, when you want to create your own column type for the DataGridView, you inherit the DataGridViewColumn class to create your own column type, inherit the DataGridViewCell class to create your own cell type and inherit your desired control and implement the IDataGridViewEditingControl interface to create your own editing control. For an example of how that's done see here. What I would recommend is creating your own DataGridViewProgressBarColumn and DataGridViewProgressBarCell classes, but do not create a DataGridViewProgressBarEditingControl class. In the cell you would use a ProgressBarRenderer object to draw the appearance of a ProgressBar in your cell without ever creating a ProgressBar control.
As for the ListView, it was never intended to support embedded controls so you would have to hack it. I've seen several instructions on how to do that, including this one.