Question
1986
US
Last activity: 29 May 2018 14:45 EDT
How to Restrict the number of visible rows/records in DataGridView Control
Hi,
I am using DataGridView Control to display the records on Windows Form. Currently the source is Table View, which gets the data from ODBC query.
Now, I want to restrict the number of records shown on UI to certain number. For Example, if the Table view is having 100 records, I just want to show to 25 only.
Is there any view achieve it using the properties/methods present in DataGridView Control?
I don't want to reduce the number of records in TableView. I want to restrict the visibility in UI only.
I already achieved my requirement using any other way (copying the required number of records from TableView to LookupTable and then giving the LookupTable data as source to this DataGridView Component, but want to know the best way of controlling the row count in Data Grid itself.
Please let me know whether can we acheive this.
Thanks,
Param