private void advBandedGridView1_CustomUnboundColumnData(object sender,CustomColumnDataEventArgs e){ColumnView columnview = sender as ColumnView;if (e.Column.FieldName == "SubTotal" && e.IsGetData){e.Value = calcSubTotal(Convert.ToSingle(columnview.Ge
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/24 09:05:38
private void advBandedGridView1_CustomUnboundColumnData(object sender,CustomColumnDataEventArgs e){ColumnView columnview = sender as ColumnView;if (e.Column.FieldName == "SubTotal" && e.IsGetData){e.Value = calcSubTotal(Convert.ToSingle(columnview.Ge
private void advBandedGridView1_CustomUnboundColumnData(object sender,CustomColumnDataEventArgs e)
{
ColumnView columnview = sender as ColumnView;
if (e.Column.FieldName == "SubTotal" && e.IsGetData)
{
e.Value = calcSubTotal
(
Convert.ToSingle(columnview.GetRowCellValue(e.RowHandle,columnview.Columns["Math"])),
Convert.ToSingle(columnview.GetRowCellValue(e.RowHandle,columnview.Columns["Chinese"])),
Convert.ToSingle(columnview.GetRowCellValue(e.RowHandle,columnview.Columns["English"]))
);
}
}
烦请各位高手这段代码的含义!看了很长时间,看不懂!
private void advBandedGridView1_CustomUnboundColumnData(object sender,CustomColumnDataEventArgs e){ColumnView columnview = sender as ColumnView;if (e.Column.FieldName == "SubTotal" && e.IsGetData){e.Value = calcSubTotal(Convert.ToSingle(columnview.Ge
创建一个ColumnView(行的视图)对象,给这个对象添加三个列Convert.ToSingle(columnview.GetRowCellValue(e.RowHandle,columnview.Columns["English"]))
而且这三个列是Single类型的.Convert.To...是类型转换.