Hi all,
I am building a dashboard that uses docks and forms and currently have the skin chooser set up so the user can select a theme.
I want to get the name of that theme name from the skin chooser into a visual c variable and write it to the database. I then I want to load it into the skin manager when the dashboard starts next time. I am confident with writing to the database. Its getting the values to and from the skin manager into a variable.
Please reply asap
regards,
Ash
I am building a dashboard that uses docks and forms and currently have the skin chooser set up so the user can select a theme.
I want to get the name of that theme name from the skin chooser into a visual c variable and write it to the database. I then I want to load it into the skin manager when the dashboard starts next time. I am confident with writing to the database. Its getting the values to and from the skin manager into a variable.
Please reply asap
regards,
Ash
4 Answers, 1 is accepted
0
Hi Ashley,
You can access the value of the currently chosen skin by using the following line:
And respectively set it with:
I hope this helps.
All the best,
Tsvetina
the Telerik team
You can access the value of the currently chosen skin by using the following line:
string
skin = RadSkinManager1.GetSkinChooser().SelectedValue;
And respectively set it with:
RadSkinManager1.GetSkinChooser().SelectedValue =
"Sitefinity"
;
I hope this helps.
All the best,
Tsvetina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ashley
Top achievements
Rank 1
answered on 10 Aug 2010, 05:02 PM
Hi thanks for helping me so far the getvalue works but im having trouble with the set, the only thing I can think of is that i am trying to change it in a function called on "onload" when the skinmanager loads
select statement returns "Telerik"
regards,
Ash
<
telerik:RadSkinManager
ID
=
"RadSkinManager1"
Runat
=
"server"
ShowChooser
=
"true"
OnLoad
=
"loadtheme"
OnSkinChanged
=
"changetheme"
>
protected void loadtheme(object sender, EventArgs e)
{
_conn.Open();
SqlCommand command2 = new SqlCommand("select theme from States where [id]='" + _userID + "' ", _conn);
SqlDataReader r = command2.ExecuteReader();
while (r.Read())
{
RadSkinManager1.GetSkinChooser().SelectedValue = r[
"theme"].ToString();
}
r.Close();
_conn.Close();
}
select statement returns "Telerik"
regards,
Ash
0
Hi Ashley,
Could you please confirm if the Skin is not set in all cases or only on the inital Load event of the control? It is not set the first time the control loads, when using that approach, but after a postback it is set as expected. Is this the same behavior which you observe?
Greetings,
Tsvetina
the Telerik team
Could you please confirm if the Skin is not set in all cases or only on the inital Load event of the control? It is not set the first time the control loads, when using that approach, but after a postback it is set as expected. Is this the same behavior which you observe?
Greetings,
Tsvetina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Ashley
Top achievements
Rank 1
answered on 13 Aug 2010, 04:18 PM
Hi Tsvetina,
I have solved my problem, 1. by setting the value b4 the page loads and 2. setting RadSkinManager.Skin instead.
Thank you for help it was appreciated.
regards,
Ash
I have solved my problem, 1. by setting the value b4 the page loads and 2. setting RadSkinManager.Skin instead.
Thank you for help it was appreciated.
regards,
Ash