U
uknees
Hi people,
I am trying to use a currency manager on a master-detail windows
form.
However, I just can't seem to scroll the records.
here's my code:
'setting relation of datatables
ds.Relations.Add("CustOrd",ds.Tables!Cust.Columns!CustomerID,_
ds.Tables!Orders.Columns!CustomerID)
'after binding data to textbox fields and datagrid
cm=CType(Me.BindingContext(ds.Tables!Cust),CurrencyManager)
'scrolling to first record
If Not (cm Is Nothing) AndAlso cm.Count Then cm.Position = 0
'scrolling to next record
If Not (cm Is Nothing) AndAlso cm.Count AndAlso cm.Position
<cm.Count -1 Then cm.Position +=1
'scrolling to Previous record
If Not (cm Is Nothing) AndAlso cm.Count AndAlso cm.Position >0 Then
cm.Position -=1
'scrolling to Last record
If Not (cm Is Nothing) AndAlso cm.Count Then cm.Position=cm.Count-1
Can anyone help?
I am trying to use a currency manager on a master-detail windows
form.
However, I just can't seem to scroll the records.
here's my code:
'setting relation of datatables
ds.Relations.Add("CustOrd",ds.Tables!Cust.Columns!CustomerID,_
ds.Tables!Orders.Columns!CustomerID)
'after binding data to textbox fields and datagrid
cm=CType(Me.BindingContext(ds.Tables!Cust),CurrencyManager)
'scrolling to first record
If Not (cm Is Nothing) AndAlso cm.Count Then cm.Position = 0
'scrolling to next record
If Not (cm Is Nothing) AndAlso cm.Count AndAlso cm.Position
<cm.Count -1 Then cm.Position +=1
'scrolling to Previous record
If Not (cm Is Nothing) AndAlso cm.Count AndAlso cm.Position >0 Then
cm.Position -=1
'scrolling to Last record
If Not (cm Is Nothing) AndAlso cm.Count Then cm.Position=cm.Count-1
Can anyone help?