Theoretically, this should be a simple task and clearly I am just missing something.
The Issue:
I have a web data menu, pretty basic, contains data menu items which some in turn contain items of their own. When created in markup all elements in said menu are set to enabled="false". When the usercontrol runs through it's page_prerender phase a sub routine (VB) is called which enables required elements based on a series of situations. When the controls loads all elements are still not enabled (however imageurl clearly changes which is done in code behind), yet if said usercontrol then performs a postback everything works as it should.
Clearly this is a case where the webdatamenu is not updating the css applied to said elements when the enabled property is being changed. I am wondering if there is some kind of event I could call which would update the css for said control.
Basic Info:
This is for an upgrade from the UltraWeb controls to the non-deprecated controls pages are currently using assembly Infragistics4.Web.v10.3 with this upgrade being with intent to bring ourselves up to date.
Hello Guy,
I have tested this scenario with the latest version using both a WebDataMenu in a usercontrol and a regular form and so far enabling the nodes on PreRender in both cases seems to refresh the styles as needed. Attached is my test sample for your reference. Please feel free to modify it in order to illustrate the behavior and allow me to look into this further.
So Could this be that we are seeing this issue because we are currently stuck on an older version (v10.3)? If so is there a way to at least solve this behavior for now until our upgrade is complete?
We are currently working on upgrading from the deprecated controls in order to upgrade our infragistics version.
Guy,
Is the menu inside the UpdatePanel with other controls or outside of it? If it is outside the UpdatePanel, then this could cause the issue with what you set on the server not taking affect.
The page from which all the controls are spawned has an update panel encompassing them all, The control on which the menu is located also has an update panel which includes this menu.
If I understand correctly you have an UpdatePanel that contains an UpdatePanel that contains a WebDataMenu that items are not enabled until after another post back to the server. The request to the server where the WebDataMenu items are enabled in your code, is it triggered by a control in the inner UpdatePanel?
Convoluted I know but I did not write this. But yes, there is an update panel on the main page inside this update panel is a control with a Grid, a link on this grid goes to the current control of interest which has an update panel. Inside this update panel is the Menu, during Page_PreRender the logic is called to enable particular items on this WebDataMenu dependant on certains variables.
If you add a Label next the the WebDataMenu and set its Text property to DateTime.Now.ToString() in Page_PreRender when you enable/disable the menu items is this Label's text being updated when you expect the Menu to update or does it also remain with the same value until a subsequent post to the server?
Thank you for the update. I will watch this thread for when you an example that I can test with.
I am working on putting something together. Will report back when am able
I need a sample that reproduces the issue to be able to debug this. I know that you tried to reproduce this in a sample before and were not able to. Are you able to reproduce it in a smaller example by starting with your application and removing other pages and making it a simpler example? If you can provide the example through the case and I can take a look.
OK, I ran the test.
The Labels Text is updated when I would expect the menu to be enabled, I even tried adding it into a clause that would only run if the conditions for the menu to be enabled would be false and at that point it did not update.
This shows that the conditions are evaluating correctly but the webdatamenu is not enabling as it is supposed to.
I shall try this at my next available opportunity and report back