on 12-10-2009 3:05 PM
hi every one
i have user form where i have a matrix with some columns...
in first column of matrix i have opened a sub form with some details in OPCH table( DocNum) when i double click on sub form i have to get the selected value into mu matrix coloumn...
i have written this code...
If Gval = "V_0" Then
oMatrix.Columns.Item("V_0").Cells.Item(1).Specific.value = ogrid.DataTable.GetValue(1, pVal.Row)
' oMatrix.Columns.Item("V_0").Cells.Item(1).Specific.value = ogrid.DataTable.GetValue(1, pVal.Row)
'oMatrix.Columns.Item("V_1").Cells.Item(1).Specific.value = ogrid.DataTable.GetValue(24, pVal.Row)
'oMatrix.Columns.Item("V_2").Cells.Item(1).Specific.value = ogrid.DataTable.GetValue(12, pVal.Row)
'oMatrix.Columns.Item("V_3").Cells.Item(1).Specific.value = ogrid.DataTable.GetValue(10, pVal.Row)
End If
but this is throwing error as Invalid row index.....
but when i try to get value in a msgbox...iam getting value perfectly....
plz provide me the solution...
Hi Shenaz,
Matrix row index is a 1 based collection oposed to a DataTable/DBDataSource row index, which is 0 based.
So, when reading/writing to a Matrix Row use pVal.Row. When reading/writing to a DataTable/DBDataSource use pVal.Row-1.
Regards,
Vítor Vieira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.