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
295
How to find out the number of visible columns?
posted

It is easy to find out that a leftmost column is selected:

grid.ActiveCell.Field.ActualPosition.Column == 0

Is there an easy way to do the same about the rightmost column?

Parents
No Data
Reply
  • 69686
    Suggested Answer
    posted

    This will not be necessarily true. If you have fields in multiple rows, you can have two fields in the Column-0 - so make sure you take this into consideration as well. You can try checking in the Fields collection of the FieldLayout and see the count of all the fields and check which Column should be the last one. Again, you can have multiple rows of fields and not have as many columns as fields.

Children