On my form there is a datagridview that may get upwards to about 70k items depending on how scan happy our customers get. I also have a textbox which allows the user to search the datagridview using the textchanged event. I'm using a select statement with the like clause and filling the dataset. I dont think this will cut it, because the program hangs and gets laggy when there is a large amount of records. Whats the best way I can do this if performance is a top priority?
Sql – Best way of searching through a DataGridView in VB.NET
searchsqlsql servervb.net
Related Topic
- Unix – Use grep –exclude/–include syntax to not grep through certain files
- Vb.net – conditional ternary operator in VB.NET
- Sql-server – the best way to auto-generate INSERT statements for a SQL Server table
- Sql – Best approach to remove time part of datetime in SQL Server
- C# – Fastest Way of Inserting in Entity Framework
- Sql – Best way to select random rows PostgreSQL
- Sql – Find a string by searching all tables in SQL Server
Best Answer
If you aren't worried about the number of records being selected, just download the entire dataset.
Create a dataview object on your filled table.
Set the DataGridView.DataSource = your dataview object.
Then, instead of using the textbox's textchanged event to fill the dataset, use it to change the .RowFilter property on your dataview.