Filtering data using dataview

By bryan tugade

We can filter data using dataview.

Imports System.Data

Partial Class datasources_Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim dt As New DataTable
        dt = yourdatatable

        Dim dvFail As New DataView(dt)
        dvFail.RowFilter = "field1='filter1' "

    End Sub
End Class

Filtering data using dataview  (904 Views)