datagrid1中的数据不会和文本框中的同步....
我点完增加后....datagrid1里面的数据不会跟着增多一条呀...要靠我移动前一条和后一条后..再点一次保存才行...?
还有.....我的前一条和后一条问题.....如果一直按前一条..然后再点后一条就会出现数组越界....怎么改..代码如下 ...
上一条:
Private Sub btnNavPrev_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNavPrev.Click
Me.BindingContext(DataSet11, "ad_class").Position = (Me.BindingContext(DataSet11, "ad_class").Position - 1)
Me.DataSet11_PositionChanged()
num = DataSet11.Tables("ad_class").Rows.Count
DataGrid1.CurrentRowIndex -= 1
End Sub
下一条:
Private Sub btnNavNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNavNext.Click
Me.BindingContext(DataSet11, "ad_class").Position = (Me.BindingContext(DataSet11, "ad_class").Position + 1)
Me.DataSet11_PositionChanged()
num = DataSet11.Tables("ad_class").Rows.Count
DataGrid1.CurrentRowIndex += 1
End Sub
请大家帮忙...谢谢!!!!!!!!!!