PC Review


Reply
Thread Tools Rate Thread

Anyway to tell if a datagrid row is visible?

 
 
Terry Olsen
Guest
Posts: n/a
 
      24th Nov 2004
I need a way to programmatically tell if a row is visible or has scrolled
out of view. Any Ideas? Thanks!


 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      24th Nov 2004
Hi,

In form load event save location of first cell in datagrid.

pt = dg.GetCellBounds(0, 0).Location



To get first visible cell and number of visible cells



Dim hti As DataGrid.HitTestInfo = dg.HitTest(pt)

Dim newRow As Integer = hti.Row

Trace.WriteLine(String.Format("First Row {0} Visible rows {1}", hti.Row,
dg.VisibleRowCount))



Ken

-------------------

"Terry Olsen" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
I need a way to programmatically tell if a row is visible or has scrolled
out of view. Any Ideas? Thanks!



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
datagrid -get the first -visible- row. tony Microsoft Dot NET Compact Framework 1 30th Nov 2009 01:45 PM
Top visible row in datagrid? Lennart Nielsen Microsoft VB .NET 2 7th Oct 2005 03:42 PM
last visible row of datagrid? Lore Leuneog Microsoft ADO .NET 1 28th Oct 2004 05:29 AM
Datagrid not visible Fabrizio Microsoft C# .NET 2 17th Nov 2003 03:02 AM
DataGrid - Try to keep column visible scorpion53061 Microsoft VB .NET 1 1st Oct 2003 12:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:47 PM.