I have a windows form that has two DataGridViews (DGVs) that will hold 25,000+ records and 21 columns each. I have successfully loaded each with the data from the DB using
I'm not sure this is quite what you're asking, but I like to create a subset of data to intitially load, and then include search functionality. This is very easy to do using visual studio 15 and DataSources / data sets. In solution explorer, open your dataset.xsd file. It will be named DataSet.xsd Go to the Data Table in question. Right-click, and add a query. One thing I commonly do is just add "TOP 1000" to my query. So, select * from mytable becomes select TOP 1000 * from mytable
Finally, double-click on your form to find your _load method, and alter the "Fill" to use your new query. This might be best demonstrated with an example:
The first line of code that I commented out is what Vis Stud created by default. The second is the one I added, which will get only the top 1000 records.
private void Form_Customers_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'stage2DataSet.customers' table. You can move, or remove it, as needed.
/* this.customersTableAdapter.Fill(this.stage2DataSet.customers); */
this.customersTableAdapter.FillBy_Top_1000(this.stage2DataSet.customers);
}