datagrid issue

  • Thread starter Thread starter DougMcKenzie
  • Start date Start date
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.
 
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.
 
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
 
Back
Top