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




Reply With Quote