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
680
UltraWinGrid - Adding (column header) grouped unbound columns to a RowLayout
posted

Hello,

I'm using an UltraWinGrid. Depending on my indata I wish to add a number of unbound boolean columns. I want to group these columnheaders together using the grouping feature that was added in 9.1. My problem is that when I add these columns (and their common group) the group is hidden behind my databound columns. I'm guessing that this has something to do with RowLayoutGroupInfo and OriginX, OriginY. But after modifying the code in a number of ways, I still can't figure out how to make my new group not get hidden behind the already existing columns.

Is there any good tutorial on setting up this kind of "on the fly" scheme in a WinGrid with unbound columns?

Chers, Johan

Parents
  • 469350
    Offline posted

    Hi Johan,

    Are you setting the OriginX and OriginY of the new group? I think if you don't set it at all, then the default values are -1 and this means it will place the grid at the right-hand side of the layout. Or maybe it's -2 that will do that.

    If those don't work, then what you need to do is take a look at the groups or columns that you have currently display and look at the OriginXResolved and SpanX of each one. You only have to worry about the top-level ones. For example, if you have columns inside a group, then you can ignore those. You only need to be concerned with groups and columns that are at the root level and are not contained inside another group.

    Then you just have to find the highest OriginXResolved+SpanX to find out the coordinates of the last logical column in the layout and you can set SpanX on the new group to that value so it's at the end.

Reply Children