Results 1 to 1 of 1

Thread: Filtering data from mshflexgrid in vb6.0

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2009
    Posts
    1

    Filtering data from mshflexgrid in vb6.0

    hi,
    everybody i have worked in vb 6.i try to do filtering the data from MSHFlexgrid.if select one data means that data only exit,other data i want to remove.i write the code also.
    but that not working, i using the code is following .please help anybody
    Code:
    Private Sub Filter_In_Grid(ColNumber As Integer)
    Dim I, j As Integer
    Dim m As String
    m = cmbCrieteria.Text
    Call Fill_GridData
    j = 1
    I = 0
    Label1.Caption = MSHFlexGrid1.Rows
        'MSHFlexGrid1.RemoveItem (1)I
           For j = 0 To MSHFlexGrid1.Rows - 1
            If MSHFlexGrid1.TextMatrix(I, ColNumber) = m Then
           
         Label1.Caption = MSHFlexGrid1.TextMatrix(I, ColNumber)
           'MSHFlexGrid1.Row = I
           Else
           If I <> 0 Then
           MSHFlexGrid1.RemoveItem (I)
            End If
                  End If
                  I = I + 1
                  
        Next j
       ' Label1.Caption = MSHFlexGrid1.TextMatrix(2, ColNumber)
    Exit Sub
    
    End Sub
    Last edited by Hack; Apr 21st, 2009 at 06:30 AM. Reason: Added Code Tags

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