我正在通过webapi Get方法从数据库中获取一些数据。我想通过ajax将相同的数据绑定到gridview控件
我能够将数据绑定到标签控件。
Protected Sub UpdateFilter()
_isSorted = False 'remove sort.
Try
'We filter on the entire collection
Dim filtered = _originalData.AsQueryable()
If Not String.IsNullOrEmpty(_filter) Then filtered = filtered.Where(_filter)
Dim filteredResult = filtered.ToList()
Items.Clear()
If filteredResult IsNot Nothing AndAlso filteredResult.Count > 0 Then
For Each tItem As T In filtered
Items.Add(tItem)
Next
End If
Catch
'Reset the list
Items.Clear()
For Each tItem As T In _originalData
Items.Add(tItem)
Next
'Rethrow the error
Throw
Finally
OnListChanged(New ListChangedEventArgs(ListChangedType.Reset, -1))
End Try
End Sub
现在我希望将相同的数据显示到网格..如何将其与网格绑定
PS:用户名和密码是属性。