datagrid issue

D

DougMcKenzie

I have a datagrid, with many entries, so there is a vertical scroll bar
that goes down a ways. What I want to do is have a textbox, that does
a partial string search, and highlights the row that is the best match.
I have all of that working, the only problem is that if the row that
gets highlighted is below the visible window, it doesn't scroll down to
it, so the user has to do it themselves. Is there any way to make the
datagrid scroll down there by itself? Any help is greatly appreciated.
 
D

DougMcKenzie

I'm doing this now by using:

datagrid1.Select(rowNumber);

is there some way to set the current cell that would automatically go
to where I want it to?
A better way of explaining this is that I have like 30 rows, only 10
are visible, and it is selecting like #27.
 
V

vikash

Hi

i suppose that u are looking for dataset's limited record fetching kind
of method.
where u can show limited records in ur datagrid and can get the
selected record's position as well.

suppose u have 30 recs.
divide it so that it displays 10 recs a page (page = 30/10)
now to get the 27 rec

rec_page = 27 / 10 = 2
rec_pos = 27 % 10 = 7

that is after 2nd page 7th rec.

u should search for same

Thanks & Regards
Vikash
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top