2009-07-16 87 views
0

我正在使用Infragistics的UltraGrid,并在选择单元格值时遇到问题。每当我选择一个单元格值时,它显示为默认值0.000。我想将它显示为0或1.我已经使用UltraGrid设计器进行了更改,但出于某种原因它总是显示0.0000。奇怪的是,当集合绑定到网格时,它只包含0或1.虽然列的数据类型是十进制的。Infragistics UltraGrid选定的单元格值

回答

0

似乎问题与绑定到列的Decimal类型字段有关。我将该字段更改为Double,现在它工作正常!

1

我找到了一个解决方案来检索infragistic的UltraGrid当前复选框值:

private void grid_CellChange(object sender, CellEventArgs e) 
     { 

// retrieve the current checkbox value 

this.grid.Rows[e.Cell.Row.Index].Cells["Selection"].Value = !((bool)this.grid.Rows[e.Cell.Row.Index].Cells["Selection"].Value); 

bool selVal = (bool)this.grid.Rows[e.Cell.Row.Index].Cells["Selection"].Value; 

... 
} 
相关问题