protected void ToggleViewMode(object sender, CommandEventArgs e) { if (e.CommandName == "ToggleViewMode") { switch ((string)e.CommandArgument) { case "0": if (this.views.ActiveViewIndex != 0) { Util.SwapGrid(this.views, 0, this.CurrentGrid, this.gridMain); ProfileUtil.ToggleGeneralBrowseMode(0); } break; default: if (this.views.ActiveViewIndex != 1) { Util.SwapGrid(this.views, 1, this.CurrentGrid, this.grid2); ProfileUtil.ToggleGeneralBrowseMode(1); } break; } } }
protected void ToggleViewMode(object sender, EventArgs e) { switch (this.hfViewMode.Value) { default: case "0": Util.SwapGrid(this.views, 0, this.CurrentGrid, this.gridViewUsers); ProfileUtil.ToggleUserBrowseMode(0); break; case "1": Util.SwapGrid(this.views, 0, this.CurrentGrid, this.gridViewUsers); ProfileUtil.ToggleUserBrowseMode(1); break; case "2": Util.SwapGrid(this.views, 1, this.CurrentGrid, this.gridView2); ProfileUtil.ToggleUserBrowseMode(2); break; } }