Good day,
I'm making a report which requires to select certain rows and send a notification to an email regarding the selected rows, I managed to insert the column via the InitializeLayout event and this code:
private void igrReportTickets_InitializeLayout(object sender, InitializeLayoutEventArgs e) { UltraGridColumn checkColumn = e.Layout.Bands[0].Columns.Add(@"checkColumnKey", @"Generar OS"); checkColumn.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox; checkColumn.CellActivation = Activation.AllowEdit; this.igrReportTickets.Rows[0].Cells[0].Activation = Activation.AllowEdit; this.igrReportTickets.DisplayLayout.Bands[0].Columns[0].CellActivation = Activation.AllowEdit; checkColumn.Header.VisiblePosition = 0; }
Which worked just great, but I'm not able to check or uncheck the checkboxes, I used the properties in this article here, but none seemed to work. I found a post that I found useful, but after downloading the samples I never managed to open them.
This is the post: http://community.infragistics.com/forums/p/52125/271571.aspx#271571
found this in another topic while digging deeper:
checkColumn.CellClickAction = CellClickAction.Edit;
After adding it, it worked like a charm,
private void igrReportTickets_InitializeLayout(object sender, InitializeLayoutEventArgs e) { UltraGridColumn checkColumn = e.Layout.Bands[0].Columns.Add(@"checkColumnKey", @"Generar OS"); checkColumn.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox; checkColumn.CellActivation = Activation.AllowEdit; checkColumn.CellClickAction = CellClickAction.Edit; checkColumn.Header.VisiblePosition = 0; }
Thanks to Mike Saltzman