Click here to Skip to main content
15,922,523 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi I want to add the Items in List view Control throw for loop Iteration

thanks in Advance
Posted
Comments
AspDotNetDev 9-Dec-10 0:20am    
Soooo.... uh.... do it?

DataSet ds = new DataSet();
da.Fill(ds);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)

{

Listview1.Items.Add(ds.Tables[0].Rows[i]0].ToString());

}
 
Share this answer
 
Comments
fjdiewornncalwe 12-Jan-11 22:44pm    
My vote of 1: We don't encourage doing other people's homework. We help with problems they encounter based on their showing us where something went wrong.
for (int i = 0; i < 10; i++)
  {
   listView1.Items.Add(i.ToString());
  }
 
Share this answer
 
Comments
fjdiewornncalwe 12-Jan-11 22:44pm    
My vote of 1: We don't encourage doing other people's homework. We help with problems they encounter based on their showing us where something went wrong.

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