hi i have a dgv "its databound" i have 2 cols that re image box's now when a row is selected i want the image boxes to show a certain image and when a row is not selected i want the image cells to show a different image.
I have tried
now this works however the images look to be re-painting themselves constantly cousing a flicker to be seen also this freezes the program when i attempt to click another control.
i have also tried the code in the
*row prepaint
*cell formating
but i always get the same issue.
Does any 1 know i am doing wrong
cheers,
Nathan
I have tried
Code:
Private Sub ProfilestableDataGridView_RowPostPaint(sender As Object, e As DataGridViewRowPostPaintEventArgs) Handles ProfilestableDataGridView.RowPostPaint
If ProfilestableDataGridView.Rows(e.RowIndex).Selected Then
Me.ProfilestableDataGridView.Rows(e.RowIndex).Cells("imagecol").Value = My.Resources.icon_profiles_selected_fw
Me.ProfilestableDataGridView.Rows(e.RowIndex).Cells("viewingcol").Value = My.Resources.icon_arrow_fw
Else
Me.ProfilestableDataGridView.Rows(e.RowIndex).Cells("imagecol").Value = My.Resources.icon_profiles_fw
Me.ProfilestableDataGridView.Rows(e.RowIndex).Cells("viewingcol").Value = My.Resources.icon_profiles_fw
End If
End Sub
i have also tried the code in the
*row prepaint
*cell formating
but i always get the same issue.
Does any 1 know i am doing wrong
cheers,
Nathan