473,406 Members | 2,259 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,406 software developers and data experts.

Datagridview to Arraylist

I am a newbie so please bear with me.

I am using winforms to create an application. In this application i have an unbound datagridview that i am inputing information into, text, ints, checkboxes, pulldowns. There will be x number of rows and i want to take the data in each row and write it to an arraylist so i can search and build strings from this arraylist.

Any help would be appreciated.

Thanks
Mike
Oct 4 '10 #1
2 4342
Frinavale
9,735 Expert Mod 8TB
All the information you need on the DataGridView and any other .NET controls can be found in the MSDN Library. This resource should get you pointed in the right direction....there are multiple articles on the DataGridView control there. I recommend bookmarking the MSDN Library and using it as your primary resource when developing in .NET.

-Frinny
Oct 4 '10 #2
I figured it out.

This is how i did it.
Expand|Select|Wrap|Line Numbers
  1. for (int x = 0; x < dgvORATabSpace.Rows.Count; x++)
  2.                 for (int i = 0; i < dgvORATabSpace.Columns.Count; i++)
  3.                     array.Add(dgvORATabSpace[i , x].Value);
  4.  
  5.                 ar = string.Join(",", array.ToArray());
Oct 4 '10 #3

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

Similar topics

1
by: Rob | last post by:
Dear All, I have a class that exposes a few properties. These properties are used in a DataGridView. The code for that is shown bellow. The problem is that I also need to show...
0
by: Nodir Gulyamov | last post by:
Hello All, First of all thanks in advance to everyone who will try to help me. I have Form with TreeView control and DataGridView control. Each TreeNode has its own rows and due to I am placing...
1
by: Steve | last post by:
I have a string arrary that i wish to display in a datagridview but when i set the datasource to the array the resulting datagridview gives me the length of the stings not the actual strings. How...
0
by: archuleta37 | last post by:
I'm working on reading data from a spreadsheet and outputing it into a datagridview in a windows form (.net 2.0). The problem I've found is that I'm getting 84 rows where only one cell is...
0
by: Scotty | last post by:
Hi, Hope someone can help me I have a datagridview sith data Code below works fine if I print the data if there is only 1 page (without using '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! If...
2
by: Scotty | last post by:
Hi, Hope someone can help me I have a datagridview I want to print Code below works fine if I print the data if there is only 1 page (without using hasmore pages...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
3
by: weird0 | last post by:
Purpose: The objective is to update or add a new row in datagridview using an arraylist I have an arraylist inside of a class and i added an object to the arraylist on the button click event....
2
by: Vic | last post by:
I have a ArrayList bound to a DataGridView. The objects in de arryalist have 5 propertie but i need only 3 of then in de datagridview. Cane somebody tell me how to prevent that some of the...
0
by: mwcapps | last post by:
I have built an arraylist and have used it to fill an editable datagridview. Now I need to know if I can update the arraylist with whatever edits were made to the datagridview or if the edits need...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
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...

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.