Microsoft
Software
Hardware
Network
Question : problem with AccountsGrid_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles AccountsGrid.CellContentClwbr
I wish to implement the following which is OK but what seems to happen is that when I click any cell, changes to the text box entries occur only after clicking in columns 5 or 6 of the datagrid view and nowhere else. What am I doing wrong?I have included an image of the windows form
David Jenkins
Private Sub AccountsGrid_CellContentCl
ick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataG
ridViewCel
lEventArgs
) Handles AccountsGrid.CellContentCl
ick
Dim row As DataRow
If e.RowIndex >= 0 Then 'And e.ColumnIndex >= 0 Then
ClassGlobalVariables.cBook
MarkInt = e.RowIndex
row = ClassGlobalVariables.cData
Table.Rows
(e.RowInde
x)
'*************************
**********
**********
**********
*******
'link textboxes, etc to the datagrid first tab
cTitle.Text = row(TitlePFX)
cForename.Text = row(Forename)
cInitial.Text = row(CurrencyDeleteInd)
cSurname.Text = row(surname)
cAccountUID.Text = row(AccountUIDRef)
cBusinessName.Text = row(BusinessName)
AccountID.Text = row(AccountUID)
If row(AccountStartDt) IsNot Nothing Then
cAccountStartDt.Text = String.Format("{0:d}", row(AccountStartDt))
Else
cAccountStartDt.Text = ""
End If
If row(AccountEndDt) IsNot Nothing Then
cAccountEndDt.Text = String.Format("{0:d}", row(AccountEndDt))
Else
cAccountEndDt.Text = ""
End If
cAccountType.Text = row(AccountType)
cDifficultyRating.Text = row(AccountDifficultyRatin
g)
cAccountStatus.Text = row(AccountStatus)
cBillCycleCode.Text = row(BillCycleCode)
cDirectDebtDay.Text = row(DirectDebitDay)
cPlanCode.Text = row(PlanCode)
cPlanSeries.Text = row(PlanSeries)
If row(CollectionStartDt) IsNot Nothing Then
cCollectionStartDt.Text = String.Format("{0:d}", row(CollectionStartDt))
Else
cCollectionStartDt.Text = ""
End If
If row(CollectionEndDt) IsNot Nothing Then
cCollectionEndDt.Text = String.Format("{0:d}", row(CollectionEndDt))
Else
cCollectionEndDt.Text = ""
End If
cSuspendInd.Text = row(SuspendInd)
cDeleteInd.Text = row(DeleteInd)
If row(CreditScore) IsNot Nothing Then
cCreditScore.Text = row(CreditScore).ToString
Else
cCreditScore.Text = ""
End If
cCreditLimit.Text = row(CreditLimit).ToString
If IsDBNull(row(AccountNote))
Then
cAccountNote.Text = ""
Else
cAccountNote.Text = row(AccountNote)
End If
'*************************
**********
**********
**********
*********
bmkAccountUIDRef = row(AccountUIDRef)
ClassGlobalVariables.cBook
MarkInt = row(AccountUIDRef)
bmkAccountUIDRefIndex = AccountsGrid.CurrentCell.R
owIndex
ClassGlobalVariables.cBook
MarkIntInd
ex = bmkAccountUIDRefIndex
Else
'nothing
End If
End Sub
accountsaddresses.PNG
(95 KB)
(File Type Details)
see note above
accountsaddresses.PNG
(95 KB)
(File Type Details)
see note above
Answer : problem with AccountsGrid_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles AccountsGrid.CellContentClwbr
You can also use Cell click,Mouse Click ,Mouse Double Click with the same results.....
Random Solutions
Installing an SSH key onto a mac
Moving from MS SBS 2003 to a 100% hosted solution?
SharePoint 2010 - MasterPage - How to create a "header" for Branding above the ribbon so Visitors can view
Outlook/Exchange Issue with Emails not showing
Should I enable or disable TCP Offload in my Hyper-V R2 environment?
Retrieve value of calculated control on a subform
restore from DB?
Linked Informix DB to SQL Server
Java Applet Client - Security Exception
open a window using javascript