M
Mac via DotNetMonster.com
Hi all,
I have a datagrid on a form which I have set the datasource (through the form
designer) to be a dataset that I have added to the form, also through the
form designer. I then have added a tablestyle which is mapped to the relevant
table in the dataset that is associated to the datagrid and I get pre-drawn
column headings for my datagrid.
Problem is I am losing these headings when I bind data to the datagrid from
another source (as part of a button click event). The reason this happens is
I have my own user class that inherits from the CollectionBase. I then bind
this user class to my datagrid and the public properties within my user class
appear on the datagrid as the headings thus overwritting the pre-drawn
headings.
What I would like to achieve is to reapply the tablestyle that I had setup
for the datagrid in the form designer orginally. Is this possible?
Is there an alternative way to achieve what I want while keeping my user
class ?
Any help is appreciated.
regards,
Mac
I have a datagrid on a form which I have set the datasource (through the form
designer) to be a dataset that I have added to the form, also through the
form designer. I then have added a tablestyle which is mapped to the relevant
table in the dataset that is associated to the datagrid and I get pre-drawn
column headings for my datagrid.
Problem is I am losing these headings when I bind data to the datagrid from
another source (as part of a button click event). The reason this happens is
I have my own user class that inherits from the CollectionBase. I then bind
this user class to my datagrid and the public properties within my user class
appear on the datagrid as the headings thus overwritting the pre-drawn
headings.
What I would like to achieve is to reapply the tablestyle that I had setup
for the datagrid in the form designer orginally. Is this possible?
Is there an alternative way to achieve what I want while keeping my user
class ?
Any help is appreciated.
regards,
Mac