DataGridTableStyle Column Count

Is there a way to get the column count from a DataGridTableStyle?  I have a couple of different table styles, and I need to get the column count for each one at different times.  Is there a way to do that wthout having to use module variables when I create each one?  I can't use the column count of the datasource because I am using the table styles to dislay just a subset.

Thanks,
Landy
LVL 7
LandyJAsked:
Who is Participating?
 
CetusMODConnect With a Mentor Commented:
Closed, 250 points refunded.
CetusMOD
Community Support Moderator
0
 
eozz_2000Commented:
MsgBox(Me.DataGridTableStyle1.DataGrid.VisibleRowCount)
0
 
LandyJAuthor Commented:
Thanks, eozz, but I need the number of columns in this view (datagridtablestyle), the dataset row count
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
eozz_2000Commented:
Ups... let me understand... you have a dataGrid filled with 2 dataGridTableStyle objects... and you need to know the row count of... who?
0
 
LandyJAuthor Commented:
My bad.  I forgot the word NOT in my last comment.  It should hav ebeen "not the dataset row count."  I need the COLUMN count of the DataGridTableStyle (the number of columns included in that object).
0
 
LandyJAuthor Commented:
I found it.   Thanks anyways.

datagrid1.TableStyles(0).GridColumnStyles.Count()
0
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.