aspx page inherited by master page then
OnCheckedChanged event Not Working inside gridview ,before inherited from master page it works fine please give me suggestion..
our Code is.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GenerateWOInvoice.aspx.cs"
MasterPageFile="~/MasterPage/PopupMasterPage.master" Inherits="Workorder_GenerateWOInvoice" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/UserControl/ucMessage.ascx" TagName="ucMessage" TagPrefix="ucMsg" %>
<%@ Register Assembly="ZedControlLib" Namespace="ZedControlLib" TagPrefix="ucControl" %>
BorderWidth="0px" CellPadding="2" Width="100%" DataKeyNames="ChargeId" OnDataBound="gvServiceCharge_DataBound"
OnRowDataBound="gvServiceCharge_RowDataBound" meta:resourcekey="gvServiceChargeResource1">
<%--
OnTextChanged="txtServiceChargeAmount_TextChanged">
Text='<%# Eval("Editable") %>'>
meta:resourcekey="txtServiceTotalResource1">
=========Cs Code.=========
protected void chkSelect_SC_CheckedChanged(object sender, EventArgs e)
{
double Total = 0;
for (int i = 0; i < gvServiceCharge.Rows.Count; i++)
{
if (((CheckBox)gvServiceCharge.Rows[i].FindControl("chkSelect_SC")).Checked == true)
{
Label editableFlag = ((Label)gvServiceCharge.Rows[i].FindControl("lblEditableFlag"));
TextBox editableServiceChargeAmount = ((TextBox)gvServiceCharge.Rows[i].FindControl("txtServiceChargeAmount"));
if (editableFlag.Text == "1")
editableServiceChargeAmount.ReadOnly = false;
else
editableServiceChargeAmount.ReadOnly = true;
Total = Total + Convert.ToDouble(editableServiceChargeAmount.Text);
}
}
txtServiceTotal.Text = Math.Round(Total, 2).ToString();
lblLaborCharge.Text = Math.Round(Total, 2).ToString();
txtTotalAfterDis.Text = Math.Round(Total, 2).ToString();
UpdateTotalAmount();
}
Replies
Know the answer? Post it — somebody with the same question will find it here.