Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
UltraGrid - UseFixedHeaders and ExclusiveColScrollRegion at the same time
posted

Hi,

In my team, we are developing an application that is using the UltraGrid with ExclusiveColScrollRegions (2 of them) to separate the "Data columns" in the left region and a custom drawn column on the right. We like that feature because we have really to distinct regions with a Separator and 2 separates horizontal scrollbars (one per region). The problem we have now is that we have to integrate the UseFixedHeaders functionality for the "Data columns" in the left region and it doesn't work well at all.

We first tried to make it work in the version 14.2.20142.2092. What happened is that we set the UseFixedHeaders to true, the pins in the column headers simply don't show up, so we can't pin them. However, the solution we tried is to avoid setting the ExclusiveColScrollRegion of the "Data columns" on the left region but keep the ExclusiveColScrollRegion set for the right custom column. By doing that we saw the pins showing up and we could pin and unpin columns. However we had a lot of issues with the Export to Excel feature and the nested rows that were not pinned correctly. Overall, after a lot of tweaking, it was working.

But now we had to pass to the version 17.1 and the behavior is not the same for some reason. With the exact same code we have, if we set the UseFixedHeaders to true, the "Data Columns" in the left region seem to disappear, but if we set them all to Fixed right after setting the UseFixedHeaders to true then we see them with their pin, however it's not something we want.

For us the best and more clean solution would be to continue setting the ExclusiveColScrollRegion of the "Data columns" in the left region and when we set the UseFixedHeaders to see the pins appear in the column headers so we can pin/unpin them, actually it's not the case even with the 17.1 version. I think in that case the export to excel and the nested rows would work correctly without us having to tweak the code and playing with their visibility order.

Thanks

Jean-François Brind'Amour

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Jean-François, 

    I tested this out with a small sample project (which I have attached here). At first, I tried setting the ExclusiveColScrollRegion on every column in the grid - some in the first ColScrollRegion and some in the second.  I tried this out in 12.2, 14.2, and 17.2 and the behavior is the same in all cases. Once I assign an ExclusiveColScrollRegion to a column header, that column will not show the pin button nor will the grid allow me to fix that header. 

    As far as I am able to determine - Fixed headers are not supported on any column which is assigned an ExclusiveColScrollRegion - and that has always been the case. 

    It sounds like you only need to fix columns in the left-most ColScrollRegion, though. So if I set ExclusiveColScrollRegion on just the column I want in the right-side ColScrollRegion, everything seems to work okay for me. Once again, I tried this out in the same three versions and it seems to work for me. I'm not seeing any problem with the columns in one scrollregion disappearing. 

    I have attached the sample project I used here so you can run it and see if you get the same results. If my sample works for you, then there must be some other factor at work in your application and we will need to figure out what that is. Maybe you can modify my sample so that it reproduces the issue you are seeing. 

    WindowsFormsApplication15.zip
Children