473,809 Members | 2,591 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data from datagrid to textbox in another form

1 New Member
How do I order the value of the selected cell in a datagrid to textbox in another form
Apr 17 '12 #1
1 2615
RhysW
70 New Member
Expand|Select|Wrap|Line Numbers
  1. textbox1.text = formname.datagridname.selectedcells[0].value
this goes on the form where the textbox is, the datagrid modifier would have to be public not private for this to work. Fill in the blanks as you need

(selectedcells[] is an array of all the selected cells, 0 being the very first one in the array, im assuming this is the one you want to use, else change the number 0 to its relevant position remembering that the array is zero-based)
Apr 18 '12 #2

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

Similar topics

2
2797
by: Vijaya | last post by:
Can we bind data to textbox in a headertemplate in a template column of a datagrid? If so please give some code snippets. Thank you
2
1822
by: Stan | last post by:
I have a dataset in one form that I instanciate there. I would like to access that dataset from another form. dim ds as new myds (myds is a dataset on the first form and is generated from a dataAdapter on that form; it is strongly typed). I fill ds and then open another form. How can I reference ds and access the data in it. Thanks, Stan
3
11917
by: Young J. Putt | last post by:
I have a vb.net datagrid bound to a dataview on a windows form. I want to use the datagrid to display and filter a list of items, but since the data is complex, I don't want the user to edit the item using the datagrid. I'd like to have another form display when the user double clicks the desired row in the datagrid, and have that form display details for the selected datagrid row. I'm having problems figuring out the best way to pass...
3
1716
by: kingflux | last post by:
Hello, and thank you in advance for any help you can provide. Each line in our datagrid control contains a product number, description, and a textbox for the user to enter a quantity-to-order. Users enter quantities (not necessarily on every line), click the Next button, and continue. Sometimes users return to a previous page, by clicking the Previous button, and see quantities that they did not enter. More often, users return to a...
8
1753
by: weird0 | last post by:
The scenario is that i have two forms, Form1( main form) and Form2 and both of them opened. Form1 has called Form2 inside of its constructor. class Form1 { const int NodeLimit=30; Node nodeArray=new Node;
1
1263
by: zeeshanks | last post by:
Dear Friends, I 'm running an sql query in one form which returns a data set. I want to show this data set into another form. I 'm programming in VB.NET after quite some time so totally lost on this. Can you help? Thanks, Zeeshan
1
2472
by: SePp | last post by:
Hi all. I want to refresh a Datagrid from another form. (in C# ) For Example I have a Datagrid in that I want to edit data. The user has the ability to press a button to change these data. A new Form opens and the user changes the data. After that he saves the changes and the current form is closing and the old form with the datagrid gets the focus again.
2
5884
by: SePp | last post by:
Hi all. I want to refresh a Datagrid from another form. For Example I have a Datagrid in that I want to edit data. The user has the ability to press a button to change these data. A new Form opens and the user changes the data. After that he saves the changes and the current form is closing and the old form with the datagrid gets the focus again.
2
7861
by: Hitman | last post by:
Hi Everyone, I have a little bit of problem with my database. I have a textbox ( the name of the textbox is location) on one form and 1 command button. I also made another form with 1 textbox (the name of the textbox is designator) . I want to use vb on programming the command button. All I want to happen is that after I place some text on the texbox (location) I click the command button and the text on (location) will be copied to the other...
2
1816
by: timr30017 | last post by:
I am new to VB.net but I am trying to recreate an old program in .net and learn as I go so any help will be greatly appreciated. I have one form with a datagrid that displays a list of 'contacts' with just the minimal basic info in the datagrid. I have another form that displays ALL the 'contacts' info. I want to double-click on any cell in the datagrid and have the other form load and show ONLY the data for that selected contact on the...
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10391
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9200
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7664
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3862
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.