In this blog we will know how to Filter a dataset using DataTable DefaultView RowFilter.
App.xml file
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="dsn" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\emp.mdb" />
</appSettings>
</configuration>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace DataTable_DefaultView_RowFilter
{
public partial
class Form1
: Form
{
string ConnectionString =
System.Configuration.ConfigurationSettings.AppSettings["dsn"];
OleDbCommand com;
OleDbDataAdapter
oledbda;
DataSet ds;
DataTable dt;

Sagar JadhavPosted Dec 27, 2017, 7:47 AM
Dt.DefaultView.RowFilter = string.Format("VAR_AREA_NAME LIKE '%{0}%'", txtFindArea.Text); GvArea.DataSource = dt.DefaultView;