943,945 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 2428
  • VB.NET RSS
Sep 13th, 2005
0

Compilation error urgent?

Expand Post »
I have the error coming when I call a dialog form passing a parameter.

An unhandled exception of type 'System.Exception' occurred in microsoft.visualbasic.dll

Additional information: Can't assign text to readonly, disabled or hidden C1Input
control when its Text property is not detached.


Public Sub DoModify()

Dim dTable As DataTable = Me.DataGrid1.DataSource
Dim bm As BindingManagerBase = Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember)
Dim dRow As DataRow = CType(bm.Current, DataRowView).Row
Me.lbNumRec.Text = Me.DsTransOverride1.Tables(0).Rows.Count.ToString()
Dim cEditTransOverride As New EditTransOverride
cEditTransOverride.ShowDialog(TransOverrideStruct) ====> Fails here
Me.DsTransOverride1.Tables(0).Clear()
Me.SqlDataAdapter1.Fill(Me.DsTransOverride1)
Me.DataGrid1.Refresh()

End Sub

Public Class EditTransOverride
Inherits System.Windows.Forms.Form
'Dim TOverride As New TransOverride.structTransoverride


#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Public Overloads Sub ShowDialog(ByRef objTransoverride As TransOverride.structTransoverride)
'
' Do All the work that you want to i.e. the one that you have written in the Load
'
'
oldPolicyNumber = objTransoverride.PolicyNumber.ToString()
oldTransCode = objTransoverride.TransCodeOrig.ToString()
oldTransEffDate = objTransoverride.TransEffDate.ToString()
txtAccountName.Text = objTransoverride.Account_Name.ToString()
txtPolicyNumber.Text = objTransoverride.PolicyNumber.ToString()
txtPlanYear.Text = objTransoverride.Plan_Year.ToString()
txtUserId.Text = objTransoverride.ModifiedUID.ToString()
txtDate.Text = objTransoverride.ModifiedDate.ToString()
dteEffDt.Text = objTransoverride.TransEffDate.ToString()
dteEffDt.Value = objTransoverride.TransEffDate.ToString()
lbRecNum.Text = objTransoverride.RowNum.ToString()
FillComboBox(cmbOriginalTransCode, objTransoverride.TransCodeOrig)
FillComboBox(cmbOverrideAction, objTransoverride.Override_Action)
FillComboBox(cmbOverrideNR, objTransoverride.Override_New_Renewal)
FillComboBox(cmbOverrideTransactionCode, objTransoverride.Override_Transaction_Code)
MyBase.ShowDialog()
End Sub
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mcupryk is offline Offline
14 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: VB.NET do not allow Msflexgrid on form
Next Thread in VB.NET Forum Timeline: Debugging Error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC