How to fetch the data on DataGridView of a column containing textbox.

Posted on 2012-09-18
Last Modified: 2012-10-27
I am working on Vb.NEt Windows Form.
I added DataGridView, then added 2 textboxes, first one was names as txtitemcode and second one was given the name txtitemname.

I want when the user enters the itemcode in the box, the second column should fetch itemname.

So my question is how to refer to that cell so that i can bind the data
Question by:searchsanjaysharma
    LVL 83

    Expert Comment

    If grid is bound to datatable/set then apply filter on that using DataView

    dTable.DefaultView.Filter = "ItemCode=" & txtItemCode.Text

    If dTable.DefaultView.Count = 1 Then
       txtItemName = dTable.DefaultView.Item(0).Item("Name")
    End If

    dTable.DefaultView.Filter = ""

    Accepted Solution

    No i want to achieve the following.
    The moment i enter itemcode, and press enter all details pertaining to that item,code
    should appear in subsequent cells in the same row.

    Author Closing Comment


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Article by: Kraeven
    Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
    Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now