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.
LVL 28
Who is Participating?
rkot2000Connect With a Mentor Commented:
   Dim x As Data.DataSet
    x.Tables("myTable").DefaultView.Count() 'rows
    x.Tables("myTable").Columns.Count() 'columns
Éric MoreauSenior .Net ConsultantCommented:
have you tried something like :
iboutchkineAuthor Commented:
Worked as a charm!!!

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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.