| if (!IsPostBack) |
| { |
| RecordKeepingGrid.ShowGroupPanel = true; |
| RecordKeepingGrid.GroupingEnabled = true; |
| RecordKeepingGrid.AllowPaging = true; |
| RecordKeepingGrid.AllowSorting = true; |
| RecordKeepingGrid.AllowFilteringByColumn = true; |
| RecordKeepingGrid.AutoGenerateColumns = false; |
| RecordKeepingGrid.PagerStyle.Mode = GridPagerMode.NumericPages; |
| RecordKeepingGrid.PageSize = 20; |
| |
| GridBoundColumn boundColumn2 = new GridBoundColumn(); |
| RecordKeepingGrid.MasterTableView.Columns.Add(boundColumn2); |
| boundColumn2.UniqueName = "FieldNameRK"; |
| boundColumn2.DataField = "Field.Name"; |
| boundColumn2.HeaderText = "Field Name"; |
| boundColumn2.AllowFiltering = true; |
| boundColumn2.AllowSorting = true; |
| boundColumn2.AutoPostBackOnFilter = true; |
| boundColumn2.Groupable = true; |
| boundColumn2.Reorderable = true; |
| |
| GridBoundColumn boundColumn = new GridBoundColumn(); |
| RecordKeepingGrid.MasterTableView.Columns.Add(boundColumn); |
| boundColumn.UniqueName = "StartDateRK"; |
| boundColumn.DataField = "startDate"; |
| boundColumn.HeaderText = "Start Date"; |
| boundColumn.DataType = Type.GetType("System.DateTime"); |
| boundColumn.AllowFiltering = true; |
| boundColumn.AllowSorting = true; |
| boundColumn.AutoPostBackOnFilter = true; |
| boundColumn.Groupable = true; |
| boundColumn.Reorderable = true; |
| |
| GridBoundColumn boundColumn3 = new GridBoundColumn(); |
| RecordKeepingGrid.MasterTableView.Columns.Add(boundColumn3); |
| boundColumn3.UniqueName = "TypeOperationRK"; |
| boundColumn3.DataField = "operation.typeOperation.name"; |
| boundColumn3.HeaderText = "Operation Type"; |
| boundColumn3.AllowFiltering = true; |
| boundColumn3.AllowSorting = true; |
| boundColumn3.AutoPostBackOnFilter = true; |
| boundColumn3.Groupable = true; |
| boundColumn3.Reorderable = true; |
| |
| GridBoundColumn boundColumn4 = new GridBoundColumn(); |
| RecordKeepingGrid.MasterTableView.Columns.Add(boundColumn4); |
| boundColumn4.UniqueName = "OperationNameRK"; |
| boundColumn4.DataField = "operation.name"; |
| boundColumn4.HeaderText = "Operation Name"; |
| boundColumn4.AllowFiltering = true; |
| boundColumn4.AllowSorting = true; |
| boundColumn4.AutoPostBackOnFilter = true; |
| boundColumn4.Groupable = true; |
| boundColumn4.Reorderable = true; |
| |
| GridBoundColumn boundColumn5 = new GridBoundColumn(); |
| RecordKeepingGrid.MasterTableView.Columns.Add(boundColumn5); |
| boundColumn5.UniqueName = "AreaRK"; |
| boundColumn5.DataField = "area"; |
| boundColumn5.HeaderText = "Area"; |
| boundColumn5.AllowFiltering = true; |
| boundColumn5.AllowSorting = true; |
| boundColumn5.AutoPostBackOnFilter = true; |
| boundColumn5.Groupable = true; |
| boundColumn5.Reorderable = true; |
| } |