Link to home
Start Free TrialLog in
Avatar of yalamanchir
yalamanchir

asked on

datatgrid

can somebody tell me how to dynamically change the number of rows in a datagrid based on a value entered by the user
thank you in advance
Avatar of fulp02
fulp02

Take the user's Input and go through the data set that many amout of times and copy the values one by one that you want to enter ! Hope that helps sorry I can not be more presice !
Good Luck . FuLP
Hi yalamanchir,

What do you mean exactly by "change the number of rows" ?

Is it paging problem ?
If so, modify the datagrid page size with the user value and (re)bind datas.

Or a data problem ?
Then , when you (re)bind datas, modify the filter of your dataview considering the user value.

Hope this will help you.
Regards.
Avatar of yalamanchir

ASKER

i want to have textbox for the users to enter a number... and if they enter 10
i want to populate that many rows in my datagrid
ASKER CERTIFIED SOLUTION
Avatar of gregasm
gregasm

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You will need to update your sql to pull just the number of records you want ie
"SELECT TOP " & CInt(TextEntry.Text) & " * FROM tblCustomer WHERE ......... "
Dont forget to rebind your datagrid to update the changes
What's up with the C?