This is a migrated thread and some comments may be shown as answers.

GridView Bitmask or Flags Column

0 Answers 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim
Top achievements
Rank 1
Tim asked on 27 Feb 2012, 01:18 AM
I was wondering if anyone has a good way for binding a column that is a bitmask / flags value.

Scenario:
  • MVVM
  • GridView shows a collection of Addresses
  • Each address can serve multiple "purposes".  A [Purpose] (int) property is on each Address object which is a bitmask / flags setting.
  • A single column will be shown for the [Purpose] property and display ALL the purpose "types" (Primary, Secondary, Billing, etc.) and checkboxes will be checked off for the ones that are "set" in the [Purpose] bitmask.

My current approach will probably be to hook into some events of the Grid and custom-bind the column and its set flags / masks.  I was just wondering if anyone had a better approach.

Tags
GridView
Asked by
Tim
Top achievements
Rank 1
Share this question
or