出现错误:System.windows.forms.datagridviewcell 并不包含RowNumber的定义,哪位能帮助告诉一下解决办法.
代码如下:protectedBindingManagerBasebmData;protectedDataTabledtData;//bAdd=true为新增,bAdd=f...
代码如下:
protected BindingManagerBase bmData;
protected DataTable dtData;
//bAdd=true 为新增,bAdd=false 为修改
protected bool bAdd;
private void dgdList_CurrentCellChanged(object sender, EventArgs e)
{
try
{
//判断bmData是否为空
if (bmData == null)
{
return;
}
if (bmData.Position != dgdList.CurrentCell.RowNumber)
{
bmData.Position = dgdList.CurrentCell.RowNumber;
LoadDataForDetail();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString ());
}
} 展开
protected BindingManagerBase bmData;
protected DataTable dtData;
//bAdd=true 为新增,bAdd=false 为修改
protected bool bAdd;
private void dgdList_CurrentCellChanged(object sender, EventArgs e)
{
try
{
//判断bmData是否为空
if (bmData == null)
{
return;
}
if (bmData.Position != dgdList.CurrentCell.RowNumber)
{
bmData.Position = dgdList.CurrentCell.RowNumber;
LoadDataForDetail();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString ());
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询