Hi Tejaswini,
1. But for that I have to draw the list again..is it rite?
Yes, you need to draw the list again.
2.And I tried
using OwnerDraw Mode it flickers alot. We can enable double buffering to reduce flickers, this is a code snippet:
public class NewListView : ListView
{
public NewListView()
{
//Enable these styles to reduce flicker
//1. Enable user paint.
this.SetStyle(ControlStyles.UserPaint, true);
//2. Enable double buffer.
this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
//3. Ignore a windows erase message to reduce flicker.
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
}
}
3. or shall i use DatGridView control?
You can use the DataGridView. In this way, you need to handle the CellPaint method to draw an image. You can get more information about CellPaint event from:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellpainting.aspxLet me know if this helps or not.
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.