TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ranjit9
NA
4
0
GridView Data to a DataTable..NET 2.0
Jun 27 2006 7:19 PM
Hi All,
Quick question. How do I get all rows from a gridview(it is not connected to any DataSet or datasource) to a DataTable(Disconnected table)?
Here is what I am trying to do. For richer user experiance I have a GridView on my Win Form,I add row(s) using gv.Rows.Add(string[],row{col1_val,col2_val...} method. Now I need to pass these rows to a custom class where I will be enumerating this set and use it for various purposes.Max the GridView will have 20 rows. So I was thinking if I can pass these rows to a DataTable and pass this table to my class, I can enumerate the rows in my class.
I know I can use for each row in GV add row to DataTable, other than this is there a method deom either of the classes(GridView, DataTable) where I can bind one another?
Can anyone help me solve this?
Thank you in advance.
--Ranjit
Reply
Answers (
0
)
DataGridView problem using ErrorText Validation
ComboBox and 2D Array