0

I have got 2 problems...
1)
How can I find the visible no. of rows in a datagridview and the index of the top row during vertical scroll.I am using visual studio 2005 windows application in c#.

2)
How to refresh datagridview's particular no. of rows instead of refreshing the entire datagridview when there is any change in database table which I am binding to dataset.
Most importantly how do I find that what all rows have been updated with changed values
while binding to dataset so that I can refresh only those affected rows to the datagridview
from next time onwards

please suggest me or provide solution

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by viswa_007
0

You can take the hight and divide it by the row height to work out the number that would be visible, to work out which are on screen, hmm, you could probably use the scroll event to work out what the current position is.

0

Thank u for ur reply
Canu please provide any suggestion for the other issue

0

If you just wish to update the visible rows, then well I explained how id expect to work out whats visible, so you could just do a query that retrieves those rows

0

Actually what I am doing is ..
one thread is calling the database to dataadapter ..Another thread is binding to dataset...repeatedly after 5 seconds..
Now I have more than 50000 rows in my dataset table ..So for better performance
I want to update only those rows from dataset to datagridview whose values are not the same from second instance..
datagridview's datasource is dataset

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.