473,382 Members | 1,791 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Anyway to tell if a datagrid row is visible?

I need a way to programmatically tell if a row is visible or has scrolled
out of view. Any Ideas? Thanks!
Nov 21 '05 #1
1 1451
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" <to******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I need a way to programmatically tell if a row is visible or has scrolled
out of view. Any Ideas? Thanks!

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Eyal | last post by:
Hello, i have a datafrid with more rows then can be seen in it,i know how to select the row with the 'currentRowIndex' but it doesnt move the row into the visible section ,can anyone help me with...
2
by: Davef | last post by:
Is there a way I can replace the datagrid with text "No recored returned" if there is no data? -- ______________________ David Fetrow HelixPoint LLC. http://www.helixpoint.com...
3
by: Raymond Lewallen | last post by:
I have a modal dialog displaying a datagrid control. Click on the column header to sort the datagrid opens a new window with the following in the location: ...
0
by: simon | last post by:
I have dataGrid with 8 columns. If the user clicks on first column then I set dataGrid.visible=false and show panel with data of the current item. When user clicks the ok on the panel, the datat...
8
by: Hanson | last post by:
I have a datagrid control in an aspx page. The datagrid columns will be dynamically generated according to the pre-page's search condition, I want to hide some columns in the datagrid. is that...
9
by: tshad | last post by:
How do I find (and set) a couple of labels in the Footer after a DataGrid is filled? I have a bunch of DataGrids that get displayed nested inside a DataList. The datagrid looks like: ...
16
by: tshad | last post by:
I am trying to center a button in a datagrid column in asp.net and it doesn't seem to work. I have the following: <asp:TemplateColumn ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">...
1
by: Rulin Hong | last post by:
Supposed I have 100 items or datarows to bind listBox control. and the control can only display 10 rows. So I need to tell the scope of the visible rows. Thanx in advance
2
by: neocarl | last post by:
Hi, I am fairly new to VB.net and ADO.net. I am having a problem when Connecting the database to to website i am creating with vb.net. Basically The final step I did was create the datagrid, so...
5
by: tshad | last post by:
I have a datagrid that I cannot get to right justify a money amount (which is just a label). No matter what I do - it still right justifies it. <asp:TemplateColumn Visible="true"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.