Click here to Skip to main content
15,914,500 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
I have data grid view it has some columns i.e Registerno, Name ..
how to store the register number column data into an array ?
Posted

1 solution

Hi Riyan,

How about declaring an array and looping through the elements. like:
VB
Dim array As String() = New String(gridview.Rows.Count - 1) {}

For i As Integer = 0 To gridview.Rows.Count - 1
	array(i) = gridview.Rows(i).Cells(0).Text
Next


Hope this helps !! :)

Regards,
Praneet
 
Share this answer
 
v2
Comments
Riyan Oliver 5-Nov-14 1:07am    
Thank you praneet.. Its working...
[no name] 5-Nov-14 1:09am    
I am glad it worked for you ! Happy to help :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900