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
Printing selection in Outlook 2010
Windows 7 PC Going To Sleep When VSS Service Stops
NetApp FAS270 - invisible disk
problem exportting gridview to excel spreadsheet
Will there be a 13" Macbook with an iCore processor anytime soon? Safe to buy C2D?
Change Management for incoming code - adding comments
JavaScript Error in IE7 menu hover background does not work
Crystal reports how to insert page break dynamically
Clearing a submit form once submitted
Stringtopostnet function not working in Crystal viewer 2008 ---