473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Selected record (Datagridview) view on a Form.

Dear Sir,

I have a Datagridview with 100 records and each records contained 15 field/columns hence it's difficult to read single record at a time completely. So my requirement is if I select a record and that particular records should display on a form or whatever.

Please give me a complete sample code so I can apply it.

Thanks a lot.
Mar 27 '11 #1
1 1577
kadghar
1,295 Expert 1GB
Put your code in the SelectedIndexChanged Sub:

Expand|Select|Wrap|Line Numbers
  1. Dim index as Long = GridView1.SelectedRow
  2. 'Your connection code to get your DataSet
  3. Dim tmpRow as dataRow = ds.tables(0).Rows(index)
  4. TextBox1.Text = Nothing
  5. For i as Integer = 0 to tmpRow.Items.Count-1
  6.     TextBox1.Text &= tmpRow.Items(i) & vbCrLf
  7. Next
That's the basic idea.
Mar 27 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
2
by: dbuchanan | last post by:
Hello, I want to open a child form based on the record selected in a dataGridView of the parent form. I want the child form to open with a populated child table based on the selected parent...
0
by: Bob | last post by:
Loading data in a datagridview control in Vs2005, Vb.Net. If data is loaded in control I need first record shown to be automatically the selected record. By defaukt it is not considered selected,...
4
by: Bad Horsey | last post by:
Windows XP MS Access 2000 Hello folks. First timer here. Have a problem with a form. I am trying to open a report using a button on a form. The report will use information from a table...
8
by: wassimdaccache | last post by:
Hello everybody The name of the form that I'm working on is 'AddProduct' I'm trying to print a selected record that I have the focus, its name is "barecode" My report name is ...
0
by: BD | last post by:
I am in the process of developing new front end program for SQL database to replace MS Access front end. I have been unable to convert the following lines of VBA to C# to find a record in the...
1
by: Sanjaylml | last post by:
I have made a Form in Access 2000, which has Client Master, default view of the same is "Single Form". Through Find command, a separate form is open, which displays opted records as continuous form....
1
by: BayZee | last post by:
I have a main form with a serach box and bound record boxes. When user enters criteria in a search box, the new form pops up that has a combo box with the list of accounts that satisfy search...
1
by: Bob | last post by:
Hello, Using VB 2005.net. I have a bound datagridview and a delete button control (or when the user pressed the 'Delete' key) I can successfully delete the selected record from the table and...
2
by: eneyardi | last post by:
How to filter selected record in a report? i have a form name Data Tracking Details where i can view my records one by one using record selector. Now, i want my current record in a form to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.