473,396 Members | 2,029 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.

VB.NET 2005 DataGridView

NaasDup
Hi

I have to read a CSV file in with 6 columns of data. The last column contains values delimited by & eg.
"Lastname","FirstName","Zip","Phone","Area","001&0 02%008&012"

There are 100's of these rows in this CSV file. I have created a DGV with the type in the last column set to ComboBox and I have parsed the last column into a String array.

Question I have is, how do I load the contents of that array into the Combobox?

I have tried this but it does not work.

Expand|Select|Wrap|Line Numbers
  1. Dim comboboxColumn As New DataGridViewComboBoxCell
  2.  
  3. Temp2 = Split(Temp1, "&", , CompareMethod.Text)
  4.  
  5. For I = 0 To Temp2.GetLength(0) - 1
  6.   comboboxColumn.Items.Add(Temp2(I))
  7. Next
  8. DGV1.Rows(myRowCounter).Cells("colCodes") = comboboxColumn
Any help would be appreciatted.

Thanks
Feb 16 '08 #1
2 1378
kenobewan
4,871 Expert 4TB
You are not iterating the i, usually done using i++. HTH.
Feb 16 '08 #2
Hi

This is VB not C# . FOR - NEXT loops.
Maybe I need to be more specific. The above FOR loop works loading the array items in the define d combobox but not the part where I assign the box to a particular cell.

DGV1.Rows(myRowCounter).Cells("colCodes") = comboboxColumn

This is the part that is not working - listing the data in the DGV cell's combobox.
Feb 16 '08 #3

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

Similar topics

1
by: Arvind | last post by:
Hi I edit a cell in a DataGridView, and then would move to another cell in the DataGridView using mouse. Then the DataGridView as of now does scroll down to the last visited cell. But when I try...
0
by: David Veeneman | last post by:
I've come across an odd bit of behavior on the VS 2005 TabControl, and I'm wondering if its a bug, or if I'm missing something. I have a TabControl with five tab pages. Each page has a...
7
by: Robert Koller | last post by:
Hello i have this problem: In a DataGridView the user work with data from a DataSet. on Start the row index from datagridview is the same as the row index from the dataset. Also: ...
1
by: thomasp | last post by:
I have a datagridview in vb.net 2005 that pulls its data from an Access Database. The database has a time column. When you view the data in Access it shows only a time in 24hour format. When the...
0
by: Jeff Vaccaro | last post by:
All I have a object that contains another object. For example my Provider object contains a clinic object. I added the Provider object as a datasource in 2005. It shows all of the properties...
4
by: dm1608 | last post by:
Hello, I have a DataGridView control in VB.NET 2005 that I would like to iterate thru row by row and parse out the individual columns into variables. Can someone provide me example code or direct...
5
by: matthewtec | last post by:
I realize there are probably many discussions on these two... whether to get now or wait or yadda yadda yadda. My question is that I can continuing training on visual studio.net 2003, and...
1
by: ken | last post by:
Hi, Lets say we have a form that displays time card entries based on the calendar control date on the form. So the user clicks on a date and the form filters the table where the time card entries...
0
by: ken | last post by:
Hi All, I wanna to change the specific cell background color or text color in DataGridView according to diff cell content (say, if "APPLE" then the cell have red in color, if "ORANGE" then the...
3
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm trying to add a datagridview control to a Windows Form to display read-only information in visual basic 2005. My understanding is that datareader will be faster for this purpose. I have the...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.