Sessions are a great way to share variable across your entire application, but they’re not accessable directly in class modules since they’re outside of page scope. So if you try something like Session(“VariableName”) = value inside of your class, you will get an error.
Fortunately there is a way. Thru HttpContext.Current notation available such common properties as Session, Server, Application, Cache. So to access your session variable inside a class just use HttpContext.Current.Session(“VariableName”) = value
Infragistics UltraWebGrid has a nice feature – OutlookGroupBy mode – which allows to group rows by common field either by dragging them into a GroupBy Box or programmatically.
The only drawback – when you have several levels of groupings (group within a group) – the outer group shows count of inner groups, not total number of individual rows within a group.

When I contacted Infragistics tech support asking how to show total count of rows within a group they told me it was impossible. Well, turned out it wasn’t entirely true.
Continue reading 'UltraWebGrid in OutlookGroupBy Mode: How to count total number of rows in subgroups'»