CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Nov 2011
    Posts
    19

    how to retrieve a full row from datagridview

    hello im trying to retrieve data from an entire row in datagridview.i know how to get data from a particular cell but i want to get the particular row into an arraylist.all i can think of is this
    Code:
    foreach (DataRow row in dt1.Rows)
                    {
                        foreach (var item in row.ItemArray)
                        {
                            list.Add(row[item].ToString());
    
                        }
                    }
    but it is showing the error:"The best overloaded method match for 'System.Data.DataRow.this[int]' has some invalid arguments"
    please help
    Last edited by lamiajoyee; January 22nd, 2012 at 08:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured