in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Search or Find Method?

Last post 02-07-2008 8:18 AM by vantibus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-12-2006 7:17 PM

    • ScottD
    • Not Ranked
    • Joined on 11-13-2006
    • Posts 1

    Search or Find Method?

    New to TrueDbGrid.  Is there a way to do a search or find on a column.  IE is there a FindFirst, FindNext or something like that.  Or do I start at row 1, compare  the cell contents to my Search String, move to the next row, etc... until I find it?  Using vb.Net with C1TrueDbGrid 2.0.20061.51219.   
  • 11-13-2006 6:09 AM In reply to

    Re: Search or Find Method?

    Hello,
     
    You may want to try the filter on columns. You may also use the CellText() or CellValue() to find the contents of a cell and compare it with your string as well. You may want to have a look at Tutor21 and also sample - IncrementalSearch, CustomFiltering.
     
    Hope this helps. Have a nice day ahead.
     
    Regards,
    Patrick 
     
     
     
    <ScottD> wrote in message news:188717@test.componentone.com...
    New to TrueDbGrid.  Is there a way to do a search or find on a column.  IE is there a FindFirst, FindNext or something like that.  Or do I start at row 1, compare  the cell contents to my Search String, move to the next row, etc... until I find it?  Using vb.Net with C1TrueDbGrid 2.0.20061.51219.   

    http://home.componentone.com/cs/forums/188717/ShowPost.aspx

  • 02-06-2008 7:56 PM In reply to

    Re: Search or Find Method?

     I'm replying to a fairly old post, but it is the same problem I am facing, so I hope it will be read.

     As in the original post, I am trying to match an item in a TrueDBGrid column.

    I have tried accessing TrueDbGrid.Columns(0).ValueItems.Values

    This "Values" member is of Type TrueDBGrid.ValueItemCollection

    The ValueItemCollection inherits  System.Collections.CollectionBase which in turn implements the IList interface which has methods for Contains(Object), Remove(Object), RemoveAt(Integer), IndexOf(Object) and so on.

    Why is it that ValueItemCollection implements some of these methods of IList and not others?

    Patrick, it seems your reply is saying I have to (effectively) implement my own Contains(Object) method?

    Jason 

  • 02-07-2008 8:18 AM In reply to

    Re: Search or Find Method?

    Set the grid's Filterbar property to true.  This will display a search/filter row above the first row of data.  The user can search/filter by any column in the grid. 

Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.