I have an Infragistics WinGrid (UltraGrid, UltraWinGrid, whatever...) with an unbound column. It has Style = Checkbox and DataType = System.Boolean. I have set DefaultCellValue to true, but every new row appears with cell.Value == False in that column. How can I get the default value to work? Thanks!
Infragistics WinGrid: How to make a CheckBox column initially checked
8.4k views Asked by Joel in Gö At
4
There are 4 answers
0
On
I see this is a old post, but this might help someone googling the answer!
On new rows, you can use the InitializeTemplateAddRow event, from there you can set the value of the desired column
//Add TemplateAddRow handler
_ultraGrid.InitializeTemplateAddRow += _ultraGrid_InitializeTemplateAddRow
//In the InitializeTemplateAddRow set the cells value
e.TemplateAddRow.Cells[CELLNAME].Value = true;
//OR
e.TemplateAddRow.Cells[index].Value = true;
If all else fails I would suggest you revert to setting the value manually on the
InitializeRowevent.