|
-
Oct 8th, 2003, 08:46 AM
#1
Thread Starter
New Member
Stack Overflow
Hi
This is driving me mad I keed getting this error:-
"An unhandled exception of type 'System.StackOverflowException' occurred in system.windows.forms.dll"
It seems to be the "dgMaterials(theRow, 7) = thetotal" line within the add row total section that is causing the problem, dgMaterials is my datagrid.
'-------------Add to datagrid---------------------
.Add(New DataGridTextBoxColumn(tblCrrncMngr.GetItemProperties.Item("estitemGross")))
With .Item(7)
.MappingName = "estitemGross"
.HeaderText = "Gross Total"
.Width = 65
.NullText = String.Empty
End With
'-----------Add Row Total------------------------
Private Sub RowTotal(ByVal theRow)
Dim theQty, cellNumber As Integer
Dim theRawcost, theVAT, theRawCostTotal, thetotal As Double
Try
theQty = dgMaterials(theRow, 4)
theRawcost = dgMaterials(theRow, 5)
theVAT = dgMaterials(theRow, 6)
thetotal = (theQty * theRawcost) * theVAT
dgMaterials(theRow, 7) = thetotal
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|