Results 1 to 6 of 6

Thread: ssdbgrid how to select a row using code

  1. #1

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Question 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
    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

  2. #2

    Thread Starter
    Fanatic Member mutley's Avatar
    Join Date
    Apr 2000
    Location
    Sao Paulo - Brazil
    Posts
    709

    Re: ssdbgrid how to select a row using code

    Hi , sorry I post in wrong place

  3. #3
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: ssdbgrid how to select a row using code

    You did indeed

    Thread moved to main forum.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  4. #4
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    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?

  5. #5
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    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

  6. #6
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    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?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width