Reputation: 5915
I need to bind repeater with some structure that has only a record. Data table is already populated. I tried to bind it with a datarow or datarowview but it do not allow to do. Any suggestion please ?
Can I use Linq query for that ? If so can you please guide me the query for selecting first row of data table ?
Upvotes: 0
Views: 519
Reputation: 26406
Try this
Dim drList As New List(Of DataRow)
drList.Add(myDataTable.Rows(0)) 'add the first row in the datatable
myRepeater.DataSource = drList
Upvotes: 1