ssdbgrid how to select a row using code
Hi
I working with ugly,obsolete...etc control ssdbgrid and can not to change for other control I give maintenance It . I must to select particular row using code. The row chosen should be in higilight
I tried a lot of things, but nothing work, I saw the ridiculous manual but could not find, searched on google something and also not found.
I tried something in AfterUpdate Event , but too no work :blush::blush:
Code:
Private Sub dbgMygrid_AfterUpdate(RtnDispErrMsg As Integer)
Call Grids_Pauta_AfterUpdate(RtnDispErrMsg, dbgPautaICMS_NCM)
Call Sel_row_grid(dbgPautaICMS_NCM, 0) 'dbgPautaICMS_NCM.Row - 1)
'dbgPautaICMS_NCM.Bookmark = dbgPautaICMS_NCM.SelBookmarks(0)
'dbgPautaICMS_NCM.Refresh
End Sub
Private Sub Sel_row_grid(dbg_grid As SSDBGrid, P_row As Integer)
Dim i As Integer
With dbg_grid
For i = P_row To P_row
.SelBookmarks.Add .RowBookmark(0)
' .StyleSets("Selected").ForeColor = Me.BackColor ' &HFFFFFF
' .StyleSets("Selected").BackColor = Me.ForeColor ' &H800000
.ActiveRowStyleSet = "Selected"
Next i
End With
End Sub
somebody know where can I examples or library functions using this trash control ?
Tia
Re: ssdbgrid how to select a row using code
Hi , sorry I post in wrong place
Re: ssdbgrid how to select a row using code
You did indeed:)
Thread moved to main forum.
Re: ssdbgrid how to select a row using code
Absolutely (although I have never used it). Just go to this Google link, https://www.google.com/#q=ssdbgrid+vb6, and you will see plenty of others who have used it, many on this very forum.
By the way, what DOES your code do? Do you get errors, or does it just not produce the color changes you need?
Re: ssdbgrid how to select a row using code
Here's another good link...as Infragistics supposedly now 'owns' that control, you might find talking with their support team helpful.
http://www.infragistics.com/search?q=ssdbgrid
Re: ssdbgrid how to select a row using code
I'm just looking at different sites.
One guy suggested:
Code:
i = 0
ssdbGrid.MoveFirst
For i = 1 To ssdbGrid.Rows
ssdbGrid.SelBookmarks.Add ssdbGrid.RowBookmark(i)
ssdbGrid.MoveNext
Next i
Does that do it?