Search or Filter Data in GridView c#
DataTable dtSales = new DataTable();
string filterField = "Country";
private void Form1_Load(object sender, EventArgs e)
{
dtSales.Columns.Add("Country", typeof(string));
dtSales.Columns.Add("Sales", typeof(int));
dtSales.Rows.Add(new object[] { "Argentina", 2000 });
dtSales.Rows.Add(new object[] { "Belgium", 4500 });
...
dataGridView1.DataSource = dtSales;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
dtSales.DefaultView.RowFilter = string.Format("[{0}] LIKE '%{1}%'", filterField, textBox1.Text);
}
Also in PHP:
- create a folder php
- dmY PHP
- adding days to a date in php
- db seeder laravel
- date en cours php
- array to string separated by comma php
- check if it's the homepage wordpress
- "Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52"
- display errors on
- Target class [Barryvdh\Cors\HandleCors] does not exist.
- console log php
- Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, string given in
- $this->db->where codeigniter result
- debugger in laravel
- FT_USER
- exceptional handling in php
- check if array conttains key
- count on a string php
- cache:clear artisan laravel
- Looping Through Select Option Dropdown with Laravel Collective
- code in try in php shows error output
- database seeding
- datefns get current time
- USA format date in php