>>You might also want to try style.GridColumnStyles.Count
>>
>>(I'm gonna try this myself, so maybe we'll both learn something!)
>
>
>can't you also say:
>
>dataset.datatable[0].columns.count?pmfji,that method only works with the requirement being that you are displaying all of the columns of the datatable. Frequently, I am not displaying all of the columns of my datatables in my datagrids. I lean towards and prefer John's approach...my 2 cents.
Kendall Webb
Senior Software Engineer
MCAD.Net/MCSD.Net