Good evening.
I want to know if there's a way to save the end-user customization of a CommandBar Control. If the user removes a button, or change the disposition of the strips... when he closes the application, next time he wants to find the layout as it was. I didn't find a method to do this.
Thank you.
Franco
I want to know if there's a way to save the end-user customization of a CommandBar Control. If the user removes a button, or change the disposition of the strips... when he closes the application, next time he wants to find the layout as it was. I didn't find a method to do this.
Thank you.
Franco
6 Answers, 1 is accepted
0

Richard Slade
Top achievements
Rank 2
answered on 23 Nov 2010, 04:48 PM
Hello Franco,
I haven't tried this feature yet, but it looks very useful. The RadCommandBar has a CommandBarElement, and from this, just like the RadGridView you can save and load a layout to a file.
For exmaple:
LoadLayout Documentation
hope this helps, but please let me know if you need further information
Richard
I haven't tried this feature yet, but it looks very useful. The RadCommandBar has a CommandBarElement, and from this, just like the RadGridView you can save and load a layout to a file.
For exmaple:
Me
.RadCommandBar1.CommandBarElement.LoadLayout(
"FileName"
)
Me
.RadCommandBar1.CommandBarElement.SaveLayout(
"FileName"
)
LoadLayout Documentation
hope this helps, but please let me know if you need further information
Richard
0
Accepted

Richard Slade
Top achievements
Rank 2
answered on 23 Nov 2010, 05:00 PM
Hello again,
i've just tried this and it works very well.
Hope this helps
Richard
i've just tried this and it works very well.
Private
Sub
Form1_Load(
ByVal
sender
As
System.
Object
, _
ByVal
e
As
System.EventArgs)
Handles
MyBase
.Load
If
My.Computer.FileSystem.FileExists(
"C:\Users\Richard\MyCommandBar.xml"
)
Then
Me
.RadCommandBar1.CommandBarElement.LoadLayout(
"C:\Users\Richard\MyCommandBar.xml"
)
End
If
End
Sub
Private
Sub
Form1_FormClosing(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.Windows.Forms.FormClosingEventArgs)
Handles
MyBase
.FormClosing
Me
.RadCommandBar1.CommandBarElement.SaveLayout(
"C:\Users\Richard\MyCommandBar.xml"
)
End
Sub
Hope this helps
Richard
0

Richard Slade
Top achievements
Rank 2
answered on 24 Nov 2010, 03:37 PM
Hi Franco,
How did you get on with this? If it helped, please mark as answer so others can find the solution too.
Regards,
Richard
How did you get on with this? If it helped, please mark as answer so others can find the solution too.
Regards,
Richard
0
Hi guys,
Thank you for writing.
Richard's suggestion is the correct way of achieving the desired scenario. However, pretty soon we are going to upload a help article regarding this topic.
Thank you Richard for your cooperation. If you guys need any additional assistance, do not hesitate to contact me.
Regards,
Stefan
the Telerik team
Thank you for writing.
Richard's suggestion is the correct way of achieving the desired scenario. However, pretty soon we are going to upload a help article regarding this topic.
Thank you Richard for your cooperation. If you guys need any additional assistance, do not hesitate to contact me.
Regards,
Stefan
the Telerik team
0

Gabriele
Top achievements
Rank 1
answered on 07 Jul 2011, 03:14 PM
Hi,
I have the same issue and aftger triying to use the SaveLayout and LoadLayour methods, the commandbar is always in the default state, any change in the position of the commandbarrows is not memorized in the XML file.
Any suggestions?
Thanks,
-Gabriele
I have the same issue and aftger triying to use the SaveLayout and LoadLayour methods, the commandbar is always in the default state, any change in the position of the commandbarrows is not memorized in the XML file.
Any suggestions?
Thanks,
-Gabriele
0

Gabriele
Top achievements
Rank 1
answered on 07 Jul 2011, 03:24 PM
Sorry, never mynd.
I did a mistake, not it works.
-Gabriele
I did a mistake, not it works.
-Gabriele