Jan 29, 2013, 4:21 PM
[CLOSED] How to change themes in code behind.
Hi
I'm new to ExtJS and Ext.Net and one of the first things I am trying to learn is how to switch to another theme.
This is the code I am trying to use:
thanks
George
I'm new to ExtJS and Ext.Net and one of the first things I am trying to learn is how to switch to another theme.
This is the code I am trying to use:
<ext:ComboBox ID="cbStyleSwitcher" runat="server" SelectedIndex="0">
<Items>
<ext:ListItem Text="Blue Theme" Value="Default" />
<ext:ListItem Text="Gray Theme" Value="Gray" />
<ext:ListItem Text="Accessibility Theme" Value="Access" />
</Items>
<DirectEvents>
<Select OnEvent="changeStyle" />
</DirectEvents>
</ext:ComboBox>
and in codebehindprotected void changeStyle(object sender, DirectEventArgs e)
{
string cSelectedTheme = "";
cSelectedTheme = cbStyleSwitcher.SelectedItem.Value;
if (cSelectedTheme == "Gray") ResourceManager1.Theme = Ext.Net.Theme.Gray;
if (cSelectedTheme == "Access") ResourceManager1.Theme = Ext.Net.Theme.Access;
if (cSelectedTheme == "Default") ResourceManager1.Theme = Ext.Net.Theme.Default;
} // eof -- changeStyle
This code excutes without an error, but no change to the webform. How to i get the page to refresh and display the new theme ?thanks
George
Last edited by Baidaly; Jan 29, 2013 at 11:13 PM.
Reason: [CLOSED]