please refer to
Implementing Virtual Mode with Just-In-Time Data Loading in the Windows Forms DataGridView Control
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
is there a way be which we can enforce a datagridview which is although having 1000 records in it , to initially show only 30 records on form page load (the very first time the form loads) .for the balance 970, it should have no scroll bar for the balance of records .
Hi @Rahul Kumar , Welcome to Microsoft Q&A,
How do you assign your own data to the datagridview?
An easy way is to only assign 30 rows of data and cancel the ScrollBars.
dataGridView1.ScrollBars = ScrollBars.None;
Enter all the inputs again when you need them, and then set the ScrollBars.
dataGridView1.ScrollBars = ScrollBars.Vertical;
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.