Hi,
The little code you show looks ok. Are you sure you are loading the
right tablestyle?
Ken
---------------
"guy" <(E-Mail Removed)> wrote in message
news:4C25B4D8-B6E3-43B2-AA00-(E-Mail Removed)...
I am binding a datatable to a WinForms grid control but for some reason the
GridTableStyle is being ignored, the data just displays as if no TableStyle
was set up
I have also tried changing the DataTable TableName in code before the code
below - no effect.
The data displayed is correct, just the formatting is wrong
SubAreasAtDate is a DataTable and dgLicensedBlocks is the data grid
hear are the two lines:-
dgLicensedBlocks.DataSource = SubAreasAtDate
dgLicensedBlocks.TableStyles(0).MappingName = SubAreasAtDate.TableName
I have also tried:-
dgLicensedBlocks.DataSource = SubAreasAtDate
dgLicensedBlocks.TableStyles.Clear()
dgLicensedBlocks.TableStyles.Add(Me.DataGridTableStyle2)
dgLicensedBlocks.TableStyles(0).MappingName = SubAreasAtDate.TableName
Equivalent code works fine on 8 other datagrids in the app.
any ideas?
guy
|