Link to home
Start Free TrialLog in
Avatar of LandyJ
LandyJFlag for United States of America

asked on

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
Avatar of eozz_2000
eozz_2000

MsgBox(Me.DataGridTableStyle1.DataGrid.VisibleRowCount)
Avatar of LandyJ

ASKER

Thanks, eozz, but I need the number of columns in this view (datagridtablestyle), the dataset row count
Ups... let me understand... you have a dataGrid filled with 2 dataGridTableStyle objects... and you need to know the row count of... who?
Avatar of LandyJ

ASKER

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).
Avatar of LandyJ

ASKER

I found it.   Thanks anyways.

datagrid1.TableStyles(0).GridColumnStyles.Count()
ASKER CERTIFIED SOLUTION
Avatar of CetusMOD
CetusMOD
Flag of Netherlands image

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