Click here to Skip to main content
15,077,494 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I would like to know if it is possible to display data inside datagridview based from the numeric data inputted by the user in the textbox.

For example, the user input 5 in the textbox. After clicking the button create, datagridview will display 5 records only. How can I do that?

Can anyone give me some links and some codes, if may be, to do this?

when you fetch data from database you can limit number of records, use relevant sql syntax for your database
Of course it is possible.
You can apply paging in datagridview and keep your page size as per the value provided in textbox.
You can refer this[^] article to know about implementing paging.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900