求帮助,
这是我在网上看别人的代码,到我这里就提示 未将对象引用设置到对象的实例
public static void DataGridCount(DataGridView datagd, int dgrindex, int dgrindex1, int dgrindex2) {if (!DBNull.Value.Equals(datagd.CurrentRow.Cells[dgrindex1].Value) & !DBNull.Value.Equals(datagd.CurrentRow.Cells[dgrindex2].Value)) {datagd.CurrentRow.Cells[dgrindex].Value = Convert.ToSingle(datagd.CurrentRow.Cells[dgrindex1].Value) * Convert.ToInt32(datagd.CurrentRow.Cells[dgrindex1].Value); }}
引用 DataGridCount(DGRep, 4, 2, 3);
或者有人帮我弄一下sql语句,我sql sever 中的数据是decimal(18,4)=int*decimal(18,2)我一添加这个就不显示数据了。不知道为什么