Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Formula not working
posted

The following code is a simplified version of you example here..

https://www.infragistics.com/samples/aspnet/calc-manager/basic-math

nothing complex, yet it doesn't work. As you know, gaining knowledge via a complete working downloadable example is teaching a horse how to fish :)...

 

<%

@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="FinancialsExperiment.WebForm2" %>

<%

@ Register Assembly="Infragistics35.WebUI.UltraWebCalcManager.v10.1, Version=10.1.20101.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Namespace="Infragistics.WebUI.UltraWebCalcManager" TagPrefix="igcalc"

%>

<%

 

@ Register Assembly

="Infragistics35.Web.v10.1, Version=10.1.20101.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"

 

 

Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig"

%>

<%

 

@ Register Assembly

="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

 

Namespace="System.Web.UI" TagPrefix="asp"

%>

<!

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"">www.w3.org/.../xhtml1-transitional.dtd">

<

 

 

html xmlns="">http://www.w3.org/1999/xhtml"

>

<

 

 

head runat

="server">

 

 

<title></title

>

</

 

 

head

>

<

 

 

body

>

 

 

<form id="form1" runat

="server">

 

 

<div

>

 

 

<asp:ScriptManager ID="ScriptManager1" runat

="server">

 

 

</asp:ScriptManager

>

 

 

<ig:WebNumericEditor ID="WebNumericEditor1" runat="server" AutoPostBackFlags-ValueChanged

=On>

 

 

</ig:WebNumericEditor

>

 

 

<ig:WebNumericEditor ID="WebNumericEditor2" runat

="server">

 

 

</ig:WebNumericEditor

>

 

 

<ig:WebNumericEditor ID="WebNumericEditor3" runat

="server">

 

 

</ig:WebNumericEditor

>

 

 

<igcalc:UltraWebCalcManager ID="UltraWebCalcManager1" runat

='server'>

 

 

</igcalc:UltraWebCalcManager

>

 

 

</div

>

 

 

</form

>

</

 

 

body

>

</

 

 

html

>

 

Imports

 

Infragistics.WebUI.UltraWebCalcManager

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Partial

 

 

Public Class

WebForm2

 

 

Inherits

System.Web.UI.Page

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me

.Load

 

 

If Not IsPostBack

Then

 

 

Me

.WebNumericEditor1.Value = 1

 

 

Me

.WebNumericEditor2.Value = 2

 

 

Me

.WebNumericEditor3.Value = 3

SetForumla(

 

Me.WebNumericEditor3, "[WebNumericEditor1] + [WebNumericEditor2]"

)

 

 

End

If

 

 

End

Sub

 

 

 

Private Sub SetForumla(ByVal control As Control, ByVal formula As String

)

 

 

' To acces extender the CalcManager extender properties, call

 

 

' the first get the GetCalcSettings method.

 

 

Dim objCalcSettings As

CalcSettings

objCalcSettings =

 

Me

.UltraWebCalcManager1.GetCalcSettings(control)

 

 

' Set the Formula

objCalcSettings.Formula = formula

 

 

End

Sub

 

 

Protected Sub WebNumericEditor1_ValueChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.EditorControls.TextEditorValueChangedEventArgs) Handles

WebNumericEditor1.ValueChanged

 

 

Me

.UltraWebCalcManager1.ReCalc()

 

 

End

Sub

End

 

 

Class

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

<%

 

@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="FinancialsExperiment.WebForm2"

%>

 

<%

 

@ Register Assembly

="Infragistics35.WebUI.UltraWebCalcManager.v10.1, Version=10.1.20101.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"

 

 

 

Namespace="Infragistics.WebUI.UltraWebCalcManager" TagPrefix="igcalc"

%>

 

<%

 

@ Register Assembly

="Infragistics35.Web.v10.1, Version=10.1.20101.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"

 

 

 

Namespace="Infragistics.Web.UI.EditorControls" TagPrefix="ig"

%>

 

<%

 

@ Register Assembly

="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

 

 

 

Namespace="System.Web.UI" TagPrefix="asp"

%>

 

<!

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"">www.w3.org/.../xhtml1-transitional.dtd">

 

<

 

 

html xmlns="">http://www.w3.org/1999/xhtml"

>

 

<

 

 

head runat

="server">

 

 

 

<title></title

>

 

</

 

 

head

>

 

<

 

 

body

>

 

 

 

<form id="form1" runat

="server">

 

 

 

<div

>

 

 

 

<asp:ScriptManager ID="ScriptManager1" runat

="server">

 

 

 

</asp:ScriptManager

>

 

 

 

<ig:WebNumericEditor ID="WebNumericEditor1" runat="server" AutoPostBackFlags-ValueChanged

=On>

 

 

 

</ig:WebNumericEditor

>

 

 

 

<ig:WebNumericEditor ID="WebNumericEditor2" runat

="server">

 

 

 

</ig:WebNumericEditor

>

 

 

 

<ig:WebNumericEditor ID="WebNumericEditor3" runat

="server">

 

 

 

</ig:WebNumericEditor

>

 

 

 

<igcalc:UltraWebCalcManager ID="UltraWebCalcManager1" runat

='server'>

 

 

 

</igcalc:UltraWebCalcManager

>

 

 

 

</div

>

 

 

 

</form

>

 

</

 

 

body

>

 

</

 

 

html

>