Datagridview and search

I got a search on my datagridview and I need to be able to pull the record up in the screen so that the user can see it. An example could be looking from an order number 30033 which is off the screen it finds it but you have to scroll down to it. I want the program to find it then go down to the record that is in the datagridview.


Answer this question

Datagridview and search

  • Prasad.k.

    I believe Billy Hollis is writing a good book on data that includes DataGridView content. Also, Rockford Lhotka is writing another good book on data and DataGridView.

    Have you checked out the DataGridView FAQ Its 70 pages of great DataGridView content: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=152467&SiteID=1 < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

     

    -mark

    DataGridView Program Manager
    Microsoft
    This post is provided "as-is"

     

     


  • RyanK

    Do u know of a good book all about Datagridview The programming books just tell a little about it. thanks for the code.
    steven
    pennington42@hotmail.com



  • Jesse W.

    do u know how to use Datarelation to make the Datagridview to have a little plus sign for each column so that the user can see another table by click the plus sign

    steven

     



  • XIU

    If the DataGridView is databound then you can use the Find method on the BindingSource. If the grid isn't databound then you will have to write some code that manually loops through the rows looking for your data. Using the BindingSource.Find method will return you a row index. Use that value and set the DataGridView's CurrentCell like so:


    dataGridView1.CurrentCell = DataGridView1.Rows[rowIndexFromFind].Cells[0];
     
    < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

     

    Hope this helps

    -mark

    DataGridView Program Manager
    Microsoft
    This post is provided "as-is"

     


  • Mikey B

    The DataGridView does not support this. It only supports showing one table at a time.< xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

     

    -mark

    DataGridView Program Manager

    Microsoft

    This post is provided “as-is”

     


  • Todd Foust

    Yes, the old DataGrid supports this.

    < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 

    -mark

    DataGridView Program Manager

    Microsoft

    This post is provided “as-is”

     


  • uraymeiviar

    did the old datagrid support this

  • Datagridview and search