Search code examples
c#visual-studiodatagridviewdatagridviewcolumn

DataGridView/ListView - Display in an Outlook style?


I'm used to using Telerik Grids and I'm able to display them in an outlook style, i.e. a picture on the far left, a bold title and a few other lines of text under the main title.

Is there a way do this using a standard .Net2.0 Windows control? Either with a cheap control, or the existing datagridview or listview?

Basically, I need to be able to produce a layout as follows:

Job Title
Engineer: Fred Bloggs
Product: Some random product

So, I'll have 2000 or so of these items in a grid with a status image next to each of them, what's the best way to achieve this?


Solution

  • Here is help with using a listview for the list. I would go with the list because you will only have one column, so no need for the grid.

    You want to use :

    private void lstItems_DrawItem(object sender, DrawItemEventArgs e)
    

    Then use the e.Graphics to get an object you can draw directly to.

    I used this tutorial to help me learn about drawing in the ListView