populating grid
-
hi How does one populate a grid with an array of objects? this is the code for populatin a dropdown list control.
Author[] authorArray = dbComponent.GetAuthors(); foreach (Author a in authorArray) { ListItem item = new ListItem(); item.Text = a.FirstName + " " + a.LastName; item.Value = a.AuthorID; ddlAuthor.Items.Add(item); }
but i want to populate a grid control... could anyone please help. Thanks -
hi How does one populate a grid with an array of objects? this is the code for populatin a dropdown list control.
Author[] authorArray = dbComponent.GetAuthors(); foreach (Author a in authorArray) { ListItem item = new ListItem(); item.Text = a.FirstName + " " + a.LastName; item.Value = a.AuthorID; ddlAuthor.Items.Add(item); }
but i want to populate a grid control... could anyone please help. Thanks