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

Posted on 2012-09-18
Medium Priority
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
  • 2
LVL 83

Expert Comment

ID: 38408898
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

searchsanjaysharma earned 0 total points
ID: 38409004
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

ID: 38541323

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Loops Section Overview

749 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