List in Datagrid

Results 1 to 2 of 2

Thread: List in Datagrid

  1. #1
    Join Date
    Dec 1969

    Default List in Datagrid

    Hi, anyone knows how to put a list (manually) inside the datagrid without using the sqlconnection? thanks<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: List in Datagrid

    One way to manually populate the Datagrid is by using an arraylist.<BR><BR>e.g.<BR>Private Function PopulateDG() As ICollection<BR> Dim MyArrayList As New ArrayList()<BR> MyArrayList.Add("Popcorn")<BR> MyArrayList.Add("Hot Dogs")<BR> MyArrayList.Add("Candy")<BR> Return MyArrayList<BR>End Function<BR><BR>MyDataGrid.DataSource = PopulateDG()<BR>MyDataGrid.DataBind()<BR><BR>HTH,< BR>Willis

Posting Permissions

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