Hi All,I need to customise Win/UltraGrid so that it renders the layout shown in the attached screenshot. The key customisations of this layout, in what I believe to be ascending order of difficulty, are as follows:1) Extensive styling of cells within the 'Strike' column (differing for header and data cells), including thick vertical 'divider lines' along the sides of each cell.2) The Second column group header is customised to include a drop-down control.3) Row group headers are rendered & customised per column group.I've been making use of WPF extensively for the last few years, which makes such customisations easy. However, I need the performance of your WinForms grid, and would really appreciate some guidance as to whether and how the above can be achieved with WinGrid.Many thanks,James
Hi James,
I haven't had a chance to look into the layout questions of the WinGrid but I'm sure whether it is straight-forward or Creation/Draw Filter required, the desired layout can be achieved. I'm more curious about what performance hit the XamDataGrid caused that prompted the swap to WinForms. I've assisted with several trading applications over the years that used the wpf grid and while there were some hits in the beginning (several years ago) we ironed out those bumps and were able to squeeze some really nice performance out of the wpf grid. Are you using a current version or an older version? What is the specific performance experience you are seeing? If you aren't at liberty to discuss details here send me a note directly (mkraft@infragistics.com).
Hi Matthew,
Many thanks for your reply, and for your generous offer assist regarding WPF perf. However, we're now committed to using WinForms. We analysed most WPF grids on the market (yours being one of the best), however none could provide the desired scrolling speed (which needs to approach Excel-like speed/smoothness), given the rather antiquated workstations we'll be deploying to. On such hardware, the WPF visual tree is simply too heavy-duty for displaying large data sets (esp. with 100+ columns) - even when showing very simple data. Therefore, I would be profoundly grateful for guidance on this WinGrid query, as we do need to know if/how that layout can be achieved.Kind regards,James
Hi Matthew, Thanks for the detailed reply; the sample project you supplied was insightful, esp. the creation filter portion. Subsequent to my last post, the objectives - and thus the guidance I desire from Infragistics' experts - have altered; been simplified I would say. I now aim to implement the above layout using *three separate WinGrids*, each occupying a column in a TableLayoutPanel. Basically, I was able to take a look at the app I'm trying to replicate in action, and it was plain as a pikestaff that it was based upon three separate grids scrolling in tandem. Accordingly, my *only* requirement now is to have have three WinGrids scrolling seamlessly in tandem.Where the three grids are bound to the exact same DataView, and each grid is responsible for displaying a fixed subset of the columns of that DataView, how can the scrolling of the three grids (*vertical only* - all cols will be autosized to fit the available width) be synchronised such that: a) lag is imperceptible; b) whenever the mouse cursor is over any one of the grids, mouse wheel scrolling scrolls all grids in tandem; and c) cursor key scrolling also scrolls all three grids in tandem. A further requirement is that scrolling must be immediate as opposed to deferred. I did a POC project to test the waters, but the results were woefully inadequate. I added the three grids to cols of a TableLayoutPanel, hid the scrollbars of all but the rightmost grid, then attempted to synchronise scrolling one of the following ways: private void UxPutGrid_BeforeRowRegionScroll(object sender, BeforeRowRegionScrollEventArgs e) { UxStrikeGrid.ActiveRowScrollRegion.ScrollPosition = e.NewState.ScrollPosition; UxCallGrid.ActiveRowScrollRegion.ScrollPosition = e.NewState.ScrollPosition; } ... or .... private void UxPutGrid_AfterRowRegionScroll(object sender, RowScrollRegionEventArgs e) { UxStrikeGrid.ActiveRowScrollRegion.ScrollPosition = e.RowScrollRegion.ScrollPosition; UxCallGrid.ActiveRowScrollRegion.ScrollPosition = e.RowScrollRegion.ScrollPosition; } The problems I observed were:a) Lag - When dragging the Put grid scroll thumb, the scroll position of the Call & Strike grids got updated (via the above event handlers) *only* when I paused my dragging of the thumb, which produced a unacceptable 'tearing' effect. Same thing happened when cursor keys initiated the scroll.b) Mouse wheel problem - a side-effect of setting the Scrollbars property to null on the Call and Put grids is that the mouse wheel no longer scrolls these grids when the mouse cursor is over them. It would need to do so. Enabling vertical scrolling for these grids and setting the scrollbar width to '1' restored mouse wheel function and almost hid the scrollbars, but not quite. Therefore, my aim is simple - to have three grids scrolling seamlessly and naturally in tandem, without the above issues. If possible, I'd be profoundly grateful for a demo project that accomplishes this goal. Best regards,
James
James,
Here is a sample application in which I tried to incorporate the features that you described. It seems to work rather well. Take a look at it and let me know if you still see the same issues that you mentioned above. Also, don't you find that if you set the ScrollStyle property of the grid to "Immediate" that that "tearing" effect goes away?
Hi Michael,
Thanks for the sample project. The results are better, but I still see problems. Scrolling via cursor keys or by dragging the scroll thumb are both ok, however there's noticeable lag; scrolling via the mouse wheel results in the grids falling out of alignment by one row, while scrolling via a click on the scrollbar track causes the grids to fall out of alignment by several rows. Also, having the scrollbar width set to 1 on the left and middle grids means that scrollbar can still be seen.
Given that smooth scrolling is such a fundamental requirement, I'm guessing I'll need to resort to the single grid view. In which case, could you please let me know how to do two things?
1) Format *column group* headers.
2) Put a control into a *column group* header
Many thanks.
Best regards,
I believe the sample that Matt attached to this thread showed how to put a dropdown into the Group Header. Isn't that what you mean?
As for "formatting the column group header", you can do that the same way you would format a column header. There is a "Header" property off the Group object and the "Header" property has an "Appearance" property. So you can do something like this:
e.Layout.Bands[0].Groups["Put"].Header.Appearance.BackColor = Color.Purple;
Let me know if you have further questions.
Is there anything else we can help you with?