?
Solved

vb.net tableLayoutPanel.rowcount is incorrect

Posted on 2014-10-06
3
Medium Priority
?
190 Views
Last Modified: 2014-10-21
Visually i have 10 rows on the screen
If i query the tableLayoutPanel.rowcount is always equals 2
this coincidentally equal my initial design time rows
i basically want to cycle through each control in the first column and need to know the number of rows
0
Comment
Question by:glenn_r
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 total points
ID: 40364639
RowCount and ColumnCount don't return the number of items

You can specify both the ColumnCount and the RowCount properties for layouts with a known and fixed number of cells. You can also specify one property or the other if you expect the number of cells in your layout to grow, assuming that the GrowStyle property allows for such growth. If the value of RowCount is 0, the panel will grow by adding rows, and if the value of ColumnCount is 0, the panel will grow by adding columns. Specifying panel growth with the GrowStyle property is preferred to setting RowCount or ColumnCount to 0, however.
http://bit.ly/1vIINJx
0
 

Author Comment

by:glenn_r
ID: 40364732
how can i get the number of rows in the control?
0
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 40364831
if you want the number of rows returned
you need to use the SQL command rowcount
http://msdn.microsoft.com/en-CA/library/ms188774.aspx

USE AdventureWorks;
GO
SELECT count(*) AS Count
FROM Production.ProductInventory
WHERE Quantity < 300;
GO

Open in new window

0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question