Link to home
Start Free TrialLog in
Avatar of iboutchkine
iboutchkine

asked on

VB.NET DataGrid

How to find the last row number ( the last column number) for DataGrid in VB.Net. IN VB6 it is DataGrid1.Columns.Count. I did not find such property in VB.NET. There is a property VisibleRowCount and VisibleColumnCount but it does not give the total quantity of rows.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

have you tried something like :
((DataTable)dataGrid1.DataSource).Rows.Count
ASKER CERTIFIED SOLUTION
Avatar of rkot2000
rkot2000

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of iboutchkine
iboutchkine

ASKER

Worked as a charm!!!
((DataTable)dglist.DataSource).Rows.Count

When i Tried the same code in vb.net the following error is displayed as tool tip
'DataTable' is a type and cannot be used as an expression.
can you give me the solution in vb.net

thanks in advance
email: kishore@sgstechnologie.com
^ ^ You have to assign it to some integer