BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
protected void EditAction(string eventType, object record)
{
List<Orders> data = Session["DialogDataSource"] as List<Orders>;
Dictionary<string, object> KeyVal = record as Dictionary<string, object>;
if (eventType == "endEdit")
{
}
else if (eventType == "endAdd")
{
}
else if (eventType == "endDelete")
{
}
Session["DialogDataSource"] = data;
this.OrdersGrid.DataSource = data;
this.OrdersGrid.DataBind();
getfreight();
}
private void getfreight()
{
var gridModel = this.OrdersGrid;
decimal subtotal = 0; decimal fright = 0;
foreach (Orders gridData in (dynamic)gridModel.DataSource)
{
foreach (Syncfusion.JavaScript.Models.Column gridCol in (dynamic)gridModel.Columns)
{
string header = gridCol.HeaderText;
if (header == "Freight")
{
object cellText = gridData.GetType().GetProperty(gridCol.Field).GetValue(gridData, null);
string _freight = cellText.ToString();
fright = decimal.Parse(_freight.ToString());
subtotal = subtotal + fright;
txtfreight.Text = subtotal.ToString("####.##");
}
}
}
}
[WebForm2.aspx]
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtfreight" runat="server"></asp:TextBox>
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" OnServerEditRow="EditEvents_ServerEditRow" OnServerAddRow="EditEvents_ServerAddRow"
OnServerDeleteRow="EditEvents_ServerDeleteRow">
… |