- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
private const int _multiple_cols = 0x0000060D; //0001000001101 - (Multiple view)
private const int _single_cols = 0x000007F1; //0001111110001 - (Single view)
private void SetGridColumnVisibility()
{
int bits = _view_type == NotificationContactViewType.Multiple ? _multiple_cols : _single_cols;
DataControlFieldCollection cols = gvContacts.Columns;
DataControlField col;
for (int i = 0; i < cols.Count; i++)
{
col = cols[i];
int bit = (int)Math.Pow(2, i);
col.Visible = ((bits & bit) == bit);
}
}