1 datagrid 3 datagrid styles

ahbenshaut

Well-known member
Joined
Oct 29, 2004
Messages
62
Location
Alaska
Programming Experience
5-10
Once again, newbie on the loose so be gentle
:p

I have desgined a windows form with a datagrid and 3 buttons below it. Each button uses a different DataGridTableStyle. When i click on one of the buttons, ( we will call it "See All Customers") and then click on one of the other button, ( we will call this one "See ES Customers"), the data is displayed exactly as I want it to. The problem is when I click on the first button i clicked, an error is raised that states that the datagrid already has this style loaded.. How can that be when it has been overwritten ( or so i thought) when I clicked the second button? How can I determine which style the datagrid has loaded?
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
how are you 'switching' between styles? it sounds like you simply need an if then statement such as

if datagrid <> currentstyle then '<>=not equal to
'load style
end if
 

ahbenshaut

Well-known member
Joined
Oct 29, 2004
Messages
62
Location
Alaska
Programming Experience
5-10
I guess i wasnt actually switching between styles. When the button is clicked, it loads the appropriate style. How do I find out which style is loaded? Also, wouldn't one style overwrite the other? How is it possible that both style could be loaded?


Thanks
 
Top Bottom