M
Michael
Hi all,
I am using Datagrid control in VB.Net 2003.
Now I have a problem like this,
when user changed the value in a cell in datagrid, I want all the
values in the same column below the current row changed to the new
value.
How can I do this?
I use currentcellchaged event like below:
Private Sub myGRID_CurrentCellChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles myGRID.CurrentCellChanged
''''Get total row count
Dim i as Integer
Dim NewValue as Integer
NewValue=CInt(myGRID.Item(myGRID.CurrentRowIndex,
ColumnNumber))
i = myGRID.BindingContext(Me.ALLOCATIONS_GRID.DataSource,
myGRID.DataMember).Count()
If (myGRID.CurrentRowIndex + 1) < i Then
myGRID.Item(myGRID.CurrentRowIndex + 1, ColumnNumber) =
NewValue
End If
End Sub
Can anybody advise on this?
I always get "ListManager's position must equal to rownum" exception.
Thanks.
Regars,
Michael
I am using Datagrid control in VB.Net 2003.
Now I have a problem like this,
when user changed the value in a cell in datagrid, I want all the
values in the same column below the current row changed to the new
value.
How can I do this?
I use currentcellchaged event like below:
Private Sub myGRID_CurrentCellChanged(ByVal sender As Object,
ByVal e As System.EventArgs) Handles myGRID.CurrentCellChanged
''''Get total row count
Dim i as Integer
Dim NewValue as Integer
NewValue=CInt(myGRID.Item(myGRID.CurrentRowIndex,
ColumnNumber))
i = myGRID.BindingContext(Me.ALLOCATIONS_GRID.DataSource,
myGRID.DataMember).Count()
If (myGRID.CurrentRowIndex + 1) < i Then
myGRID.Item(myGRID.CurrentRowIndex + 1, ColumnNumber) =
NewValue
End If
End Sub
Can anybody advise on this?
I always get "ListManager's position must equal to rownum" exception.
Thanks.
Regars,
Michael