Hi,
I am adding a CheckBox column to my wingrid at runtime. How can I make it default to 'false' as opposed to the filled in square of 'null'? Right now I am looping through each cell and setting it to False. This is also marking the row as "edited". Does anyone know a better way? Here is my code so far:
Infragistics.Win.UltraWinGrid.UltraGridColumn completedColumn;
completedColumn.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox;
{
}
Hi Ganesh,
The simplest way would be to bind the grid to a data source where all the values for that column are true.
If it's an unbound column, then you can use the DefaultCellValue property on the column and set that to true.
Or you could use the InitializeRow event to set the value of the checkbox cell to true when e.ReInitialize is false.
Hi Mike,
I have checkbox in a ultragrid and i want to first check by default when grid is loaded how can i do that please suggest me.
I've never used the datafilter before, works great.
Implementation was a breeze thanks to your sample!
I whipped up a quick sample to show you how the DataFilter approach would work. Let me know if you have any questions.
Indeed, I'd like to display both false and dbnull as unchecked.
I'll have a look at the datafilter. The grid is only used to display the values, no editting allowed.