Given the complexity of the menu's js code I was wondering if there was a generic refresh/reload call I could use? (in jQuery?)
According to your description, I couldn't understand your requirement clearly.
Could you please explain more about refresh/reload bootstrap menu?
Do you mean you want to change the bootstrap menu's test?
If this is your requirement, I suggest you could use jquery selector to focus the menu's item, then you could use jquery html method to replace the text with new text.
More details, you could refer to follow codes:
JS:
<script>
$(function () {
$("#Button1").click(function () {
$('#dropdown-tree-ul li').each(function (i) {
$(this).html('bbb'); // Here you could change the li's text
});
});
});
</script>
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
My apologies. I'd delete this append if I could. I posted too soon.
What I want to do is completely reload the menu and as I said, the code to do that is completely undocumented. I was wondering if there was a simple way to trigger a 'reload' event, for lack of a better term.
I'll just have to spend some time hacking.
Actually, after some 'hacking' I'm at a point where I have almost everything I need.
However my problem now is not 'reloading' the menu as such. The only problem I seem to have is how to do a complete clear of that bootstrap menu before I reload it.
I am actually looking at simply gridview similar control, that allow to create list view and paging. However gridview is not responsive as in it does not display details cross platform, it doesn't look as good in mobile/table. I have chosen a bootstrap html
template. the html code is like this below, vs gridview. I know how to do gridview, but i don't know how to do paging in asp.net using the bootstrap template. Please note that I am not doing MVC and just asp.net. Thanks in advance.
My apologies. I'd delete this append if I could. I posted too soon.
What I want to do is completely reload the menu and as I said, the code to do that is completely undocumented. I was wondering if there was a simple way to trigger a 'reload' event, for lack of a better term.
I'll just have to spend some time hacking.
Actually, after some 'hacking' I'm at a point where I have almost everything I need.
However my problem now is not 'reloading' the menu as such. The only problem I seem to have is how to do a complete clear of that bootstrap menu before I reload it.
Can you share the html( having the menu and the jquery code - may be I can try helping you with your issue..
Member
27 Points
424 Posts
Problems reloading a Bootstrap menu
Oct 06, 2016 08:18 PM|bchernick|LINK
I have an undocumented project (MVC C#). My experience in BootStrap and jQuery is rather limited.
As near as I can tell the page has a Bootstrap dropdown menu that is populated using Ajax calls from a dedicated js file.
What I need to happen is for this menu to refresh when ever there is an onclick event of a particular button.
Given the complexity of the menu's js code I was wondering if there was a generic refresh/reload call I could use? (in jQuery?)
The problem is that I only want that one menu to refresh, not the whole page.
Star
9831 Points
3120 Posts
Re: Problems reloading a Bootstrap menu
Oct 07, 2016 07:08 AM|Brando ZWZ|LINK
Hi bchernick,
According to your description, I couldn't understand your requirement clearly.
Could you please explain more about refresh/reload bootstrap menu?
Do you mean you want to change the bootstrap menu's test?
If this is your requirement, I suggest you could use jquery selector to focus the menu's item, then you could use jquery html method to replace the text with new text.
More details, you could refer to follow codes:
JS:
Html Makeup:
Best Regards,
Brando
Member
27 Points
424 Posts
Re: Problems reloading a Bootstrap menu
Oct 07, 2016 12:30 PM|bchernick|LINK
My apologies. I'd delete this append if I could. I posted too soon.
What I want to do is completely reload the menu and as I said, the code to do that is completely undocumented. I was wondering if there was a simple way to trigger a 'reload' event, for lack of a better term.
I'll just have to spend some time hacking.
Actually, after some 'hacking' I'm at a point where I have almost everything I need.
However my problem now is not 'reloading' the menu as such. The only problem I seem to have is how to do a complete clear of that bootstrap menu before I reload it.
Member
2 Points
17 Posts
Re: Problems reloading a Bootstrap menu
Oct 07, 2016 03:06 PM|maomimomi|LINK
I am actually looking at simply gridview similar control, that allow to create list view and paging. However gridview is not responsive as in it does not display details cross platform, it doesn't look as good in mobile/table. I have chosen a bootstrap html template. the html code is like this below, vs gridview. I know how to do gridview, but i don't know how to do paging in asp.net using the bootstrap template. Please note that I am not doing MVC and just asp.net. Thanks in advance.
Member
110 Points
23 Posts
Re: Problems reloading a Bootstrap menu
Oct 09, 2016 05:06 AM|hussainpatel|LINK
Can you share the html( having the menu and the jquery code - may be I can try helping you with your issue..
Member
27 Points
424 Posts
Re: Problems reloading a Bootstrap menu
Oct 10, 2016 03:06 PM|bchernick|LINK
Actually I've finally solved it. Embarrassingly simple.
(Please understand that I can't share the entire jQuery code due to proprietary concerns, and it's entirely too big anyway.)