Hi Brice,
Thank you for your
interest with Syncfusion products.
Query: Nevertheless each
time I am submitting the page the state of the ribbon is lost.
To be clearer, do you
want the state of buttons in Ribbon control to maintain its state after post
back on submitting the page or maintain the state of the application menu after
submission? Could please explain the query little more so that we can provide
you a better solution.
Please let us know if you have further queries.
Regards,
Ezhil S
Hi
Brice,
Thanks
for your update.
Query
1: $("#ribbon1").sfRibbon("ShowTab", 1, 1); Netherless this
code doesn't work to me
We are unable to reproduce the reported issue on “ShowTab” method which works
fine at our end. This might not work only if the Selected tab is not available
in the Ribbon control. That is sfRibbon("ShowTab", 1, 1) will let you
to show the tab available in second TabContext. Since Ribbon control holds
multiple TabContext you have to specify the TabContext element and the Tab
element to show.
Query
2: The events are fired but I need to manipulate the ribbon to show a
particular element of it.
To manipulate the Ribbon Control elements, you have to use their ID based on
the requirement. We have prepared a sample that will allow you to switch Tab on
button click and display particular Group content in that tab. We can also
define behavior for particular element in the container. Please refer the
following code snippet,
<code>
[Script]
<script type="text/javascript">
function
tabChange(inst, currValue) {
alert("Tab Changed");
$("#bold1").css("background-color", "lightgray");
for(var i=0;i<$(".grouptitlecont").length;i++)
if ($(".grouptitlecont")[i].textContent
== "Clipboard2")
// hiding the clipboard elements in
Paragraph tab
$($(".grouptitlecont")[i].parentElement).css("display", "none");
}
function
ShowTab() {
//Show the Paragraph tab in first tab
context
$("#ribbon").sfRibbon("ShowTab", 0, 1);
}
</script>
</code>
For
further reference check the online sample link below,
http://mvc.syncfusion.com/demos/ui/tools/Ribbon/ClientSideMethods
Please find the attached sample and let us
know if you have further queries.
Regards,
Ezhil
S
Hi Brice,
Thanks for your update.
We are glad that the provided solution helped you.
Please let us know if you have further queries.
Regards,
Ezhil S