Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6668779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:04:39+00:00 2026-05-26T03:04:39+00:00

Using VB.Net Windows application Form (Gridview and Textbox) GridView1 ID Name 001 Rajan 002

  • 0

Using VB.Net

Windows application

Form (Gridview and Textbox)

GridView1

ID Name

001 Rajan
002 Sajan
103 Prathev
104 vijayan
....

Conditon

When i clicked the up and down arrow (keyboard) in the Gridview1 (id or name row), then selected cell should display in the textbox and also when i enter some numbers means, that entered number should appear in the textbox and
also entered related ID or name should display in the gridview1

For Example

If i press 0, that 0 should display in the textbox, and gridview display like

ID Name

001 Rajan
002 Sajan

If i press 1, that 1 should display in the textbox, and gridview display like

ID Name

103 Prathev
104 vijayan

Tried Code for displyaing in the girdview

Dim conObjects As New ConnectionObjects
        conObjects.OpenConnection()
        Dim cmd As SqlCommand
        Dim ds As DataSet
        Dim ada As SqlDataAdapter
        cmd = New SqlCommand("Select ID, Name from employee where id like '%" & textbox1.Text & "%' ", conObjects.myConnection)
        ada = New SqlDataAdapter(cmd)
        ds = New DataSet
        ada.Fill(ds, "employee")
        gridview1.DataSource = ds.Tables(0)

Expected answer

-> In which gridview event i have to write a code
-> If i press up or down arrow, then selected cell should display in the textbox
-> If i enter some number or characters, that numbers or character should display in the textbox and selected related values should display in the gridview

How to do this.

Need help or vb.net code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:04:40+00:00Added an answer on May 26, 2026 at 3:04 am

    You can bind your dataSource to dataGridview and TextBoxes.

    Here is sample code (Add dataGridView1, TextBox1,TextBox2):

     Private Sub YourForm_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
            Dim dt As New DataTable
            dt.Columns.Add("No")
            dt.Columns.Add("Name")
    
            dt.Rows.Add(1, "A")
            dt.Rows.Add(2, "B")
    
            DataGridView1.DataSource = dt
    
            TextBox1.DataBindings.Add("Text", dt, "No")
            TextBox2.DataBindings.Add("Text", dt, "Name")
        End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using c#.net windows form application. I have a xml file whose name is
Im using c# .net windows application form. I have created many databases with many
Im using c# .net windows form application. i have a SQL database with 5
Im using c# .net windows form application. I have many databases created using sql
Im using c# .net windows form application. I have loaded names of all the
Im using c# .net , windows form application. I have a XML file which
Im using c# .net windows form application. i have a datagrid view. It has
Im using c# .net windows form application. I have created a database which has
Im using c# .net windows form application. I have two comboboxes A and B
Im using c# .net windows form application. I have a database with some tables.I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.