Click here to Skip to main content
15,907,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i am writing a code to retrieve data in grid view.
i am using .Net 2.0 and my code is
GridView1.Rows.Add("some string");
.......
it's saying definition of Rows Not found.....

i checked on MSDN also but there it's showing that it's supported in .Net 2.0.

Thnx In advance.
Posted

1 solution

GridView1.Rows.Add("some string");
It does not work like this for Gridview. There are rows and columns in grid but the way to add it different. You need to work with datatable which is source of grid.

Following article should help: Dynamically adding and deleting rows from ASP.NET GridView[^]
 
Share this answer
 

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