private void ConfigureGridColumns() { RetentionGridView.Columns.Clear(); //removed as per marty's suggestions /* var commandColumn = new CffCommandField(); * commandColumn.ButtonType = ButtonType.Image; * commandColumn.ControlStyle.CssClass = "cffGGV_centerAlignedCell"; * commandColumn.ControlStyle.Width = Unit.Pixel(50); * commandColumn.ItemStyle.Height= Unit.Pixel(30); * * commandColumn.SelectText = "View Retention Statements"; * commandColumn.Visible = true; * commandColumn.SelectImageUrl = "~/images/btn_view_retention.png"; * commandColumn.ShowSelectButton = true; * commandColumn.VisibleIndex = 0; * RetentionGridView.Columns.Add(commandColumn); * RetentionGridView.Columns[0].ItemStyle.Width = Unit.Percentage(5); */ //RetentionGridView.CssClass = "cffGGV"; RetentionGridView.HeaderStyle.CssClass = "cffGGVHeader"; RetentionGridView.AlternatingRowStyle.BackColor = System.Drawing.Color.Honeydew; RetentionGridView.ShowHeaderWhenEmpty = true; RetentionGridView.EmptyDataText = "No data to display"; RetentionGridView.EmptyDataRowStyle.CssClass = "dxgvEmptyDataRow td"; RetentionGridView.RowCssClass = "dxgvDataRow"; RetentionGridView.InsertBoundHyperLinkColumn("Client", "ClientName", "ClientId", "20%", "cffGGV_leftAlignedCell", HorizontalAlign.Left, HorizontalAlign.Center); RetentionGridView.InsertBoundCommandButtonColumn("End Of Month", "EndOfMonth", "8%", "cffGGV_underlineBoundButton", HorizontalAlign.Center, "cffGGV_centerAlignedCell", "Click to view schedule", true, true); RetentionGridView.InsertDataColumn("Status", "Status", CffGridViewColumnType.Text, "5%", "cffGGV_centerAlignedCell", HorizontalAlign.Center, HorizontalAlign.Center, true); RetentionGridView.InsertDataColumn("Released", "ReleaseDate", CffGridViewColumnType.Date, "8", "cffGGV_centerAlignedCell", HorizontalAlign.Center, HorizontalAlign.Center, true); RetentionGridView.InsertDataColumn("Notes", "Notes", CffGridViewColumnType.Text, "65%", "cffGGV_leftAlignedCell", HorizontalAlign.Left, HorizontalAlign.Left, true); bool isAllClientsSelected = (SessionWrapper.Instance.Get == null) ? SessionWrapper.Instance.GetSession(QueryString.ViewIDValue).IsAllClientsSelected : SessionWrapper.Instance.Get.IsAllClientsSelected; if (isAllClientsSelected) { //RetentionGridView.Columns["ClientName"].Visible = true; RetentionGridView.Columns[0].Visible = true; allClientsDatePickerDiv.Visible = true; datePicker.Visible = true; MonthRangePicker.Visible = false; } else { //RetentionGridView.Columns["ClientName"].Visible = false; RetentionGridView.Columns[0].Visible = false; datePicker.Visible = false; allClientsDatePickerDiv.Visible = false; MonthRangePicker.Visible = true; } }