Hi,
I had a WebCalcManager on my form and it worked great.
Recently I added a WebSplitter on the form and the calculated fields stoped working. It seems that the event is not firing.
How can I solve this?
Regards,
Nicolas
Hello Nicolas,
I am not sure how this can be related to WebSplitter (other than in some modes splitter panes are actually iframes showing different document in URL), but still this certanly sounds wierd.
Can you please send you ASPX declaration and or any codebehind that can be related to this problem? I am having hard times reproducing that, so any additional details will be welcome.
Please find attached the zip file containing the two situations.
It has three text boxes, a calc manager and a websplitter control. The formula combines the text from textbox1 and textbox2 and puts it in textbox3.
In "CalcWorking.txt" the three text boxes are outside the websplitter control and the formula executes succesfully.
In the "CalcNotWorking.txt" the three text boxes are inside the websplitter but the formula is not working.
Any news regarding the above attachments?
Hi Nicolas,
I looked at attachment. I am not expert in CalcManager and I do not know how advanced its logic to find targets and sources from Keys. I suspect that it needs not server ID of controls, but their ClientID or UniqueID. The WebSplitter is a naming container and the ids of its child html elements are not equal to server IDs. They are equal to server ClientID.
I think that if you move your codes into a UserControl (which is a naming container), then you will get exactly same problem. Try to experiment with ID values which you use in Key and Formula.
Hi Victor,
So how can i fix this problem?
I looked at codes of calcmanager, it uses Page.FindControl(calcSettings.Key). That means, you should use UniqueID, but not ID. You may find "prefix" for UniqueID in debugger and insert it in front of all keys used by manager. Example:
<igcalc:UltraWebCalcManager ID="UltraWebCalcManager1" runat="server"> <CalcSettingsCollection> <igcalc:CalcSettings Key="WebSplitter1$tmpl0$TextBox1" PropertyName="Text" /> <igcalc:CalcSettings Key="WebSplitter1$tmpl0$TextBox2" PropertyName="Text" /> <igcalc:CalcSettings Formula="concatenate( [//WebSplitter1$tmpl0$TextBox1] , [//WebSplitter1$tmpl0$TextBox2] )" Key="WebSplitter1$tmpl0$TextBox3" PropertyName="Text" /> </CalcSettingsCollection></igcalc:UltraWebCalcManager>