Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...