Hello,
I need to create the look and feel of Outlook Inbox.
Right now I am using the data grid and doing my best to style it somewhat like Outlook's inbox.
Is there a better way?
Know of any good examples or resources that would help me out?
Thanks!
I bound my grid to collection, but the column want images from is really an enum with values of Complete & Incomplete.
I hide that column and created an unbound column after the grid is bound in Initialize layout like so...
e.Layout.Bands[0].Columns["Test"].DataType = typeof(Bitmap);
e.Layout.Bands[0].Columns["Test"].CellAppearance.ImageHAlign = Infragistics.Win.HAlign.Center;
e.Layout.Bands[0].Columns["Test"].Header.VisiblePosition = 0;
then in Initialize Row i did this...
{
e.Row.Cells["Test"].Value = imageList1.Images[0];
e.Row.Cells["Test"].Value = imageList1.Images[1];
}
I only did the SortComparer because my image row wasnt sorting without it, i thought because they were images they just evaluated every row as = or something and no sorting happenend at all.
I would love to just let the grid handle it, but not sure how. Can you explain your technique in more detail?
I'm going to look at the WinExplorerBar sample you pointed me to now. That may help me as well.
Thansk again for the info.
I find that binding my data achieves better performance etc.
I just use the built in sort of the grid and don't have any troubles at one point I tried doing what you are attempting and it just caused more trouble than good so I ended up just going back to simple logic and letting the win/web Grids do what they are suppose to do :)
How are you doing your icons? You should be able to do this without using a sortcomparer.
Thanks for the info Chris. Your web page looks good.
Are you binding your data or manually loading the grid with rows?
How do you handle the sorting of the icons columns?
Right now i have my grid bound to an EmailCollection class I made.
I used a SortComparer for the sorting and assigned it to the SortComparer property or column in the grid.
Only thing i don't like though is that the grid passes ultra grid cells in for comparing, sort comparer takes objects and i have to cast back into an email object by using cell.row.dataObject. This is working well but now my EmailCollection class has references to the UltraGrid and i would prefer if it didnt. Is there an alternative? How do you handle this?
If you goto the winforms examples for infragistics and click on the WinExplorerBar then look at the Outlook Mail Folder example they are doing something similar...
In the past how I do this is group my data coming out of my select statement by date (datediff etc.) then just group it on the grid to get the today, yesterday, 2 weeks ago etc. effect and To get the open, read, attachements icons I just have bit fields and just drop the related icon in when the dataloads based on the bit field.I do the same on webpages: http://www.visualstudiotutorials.com/ss/email-shot.jpg