Hi,
Use Collection for the tablestyle's mapping name when you bind
the grid to an collection. Use Arraylist for the mapping name when you bind
to an arraylist. I would try the Name of your user class for the mapping
name
Ken
--------------
"Mac via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in message
news:51***********@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
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...b-net/200507/1