How to sort the state rows within a region by the first occurrence of rainfall as opposed to by state name??
I'm writing in C# using VS2008 unpatched and Infragistics 9.1.20091.2056.
Let's pretend I'm using a WinGrid to display rainfall amounts for states within regions over a changing date range.
The regions - such as Western, Northwest, Eastern, Southeast, etc. - are the categories in the Group By. A hidden category column allows me to group by category while still displaying a "header" row for each region in the grid.
Sorting is turned off for all columns other than the hidden category column which means Category is the only sort button in the sorting band across the top, no additional columns can be dragged there and all additional sorting needs to be handled programmatically.
The states - such as California, Nevada, etc. - belong to a region and are categorized under their region based on the region they are attached to when the rows are added to the grid.
The columns - other than the column containing the region heading and state names - are dates and appear in the grid based on there having been rainfall during the specified date range. Sorting by the user is not allowed.
If a date column appears then it indicates that at least one state in one region has a rainfall value for that date.
My confusion:
How to sort the state names within a region by the first occurrence of rainfall as opposed to by state name??
For example, if California had rain on 10/20/2009 and Nevada had rain on 10/19/2009 then Nevada should appear before California in its region group. How to accomplish this?
BTW I've been reading the posts regarding sorting WinGrids closely and repeatedly but am still confused so please give it to me simply and with examples if possible. :-)
Thanks.
Allen
Oops, sorry about that, I mixed up the name. Glad you found it. :)
I think I got rid of the pushpins cleanly by adding this:
e.Layout.Override.FixedHeaderIndicator = FixedHeaderIndicator.None;
I found the AllowColMoving property where you indicated...I added the following to the ultraGrid1_InitializeLayout event:
e.Layout.Override.AllowColMoving = AllowColMoving.NotAllowed;
I am having some trouble finding FixedHeaderUIType on the Override of the band or the layout. How do I assign this so that the pushpins are gone?
Thanks,
allenovereem said:I meant pushpins like you said and I was wondering how I'd added them simply so I could remove them.
Ah, okay, that's the FixedHeaderUIType property on the Override.
allenovereem said:Not finding any AllowColMoving property on an extensive search thru the properties of a column. What is that a property of or is it perhaps some other name?
It's on the Override. So there's an Override on the band and also on the layout.
Hi Mike,
I meant pushpins like you said and I was wondering how I'd added them simply so I could remove them. Not finding any AllowColMoving property on an extensive search thru the properties of a column. What is that a property of or is it perhaps some other name?
Perhaps you could mark up my comparer method a bit to indicate how I would sort by region without losing control of the state sorting by first rainfall and still gain control of the sorting of the region column (which is also the groupby column).