Compilation error urgent?

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2005
Posts: 14
Reputation: mcupryk is an unknown quantity at this point 
Solved Threads: 0
mcupryk mcupryk is offline Offline
Newbie Poster

Compilation error urgent?

 
0
  #1
Sep 13th, 2005
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC