i have a gridview in which i have two text boxes and one button ,when user click on
button a new row with two textboxes is added, i want to use text change event in 1st
textbox, and at the end pass a value to 2nd text box,problem is that ,value does not show up in the textbox
Hide Copy Code
protected void txtCode_TextChanged(object sender, EventArgs e)
{ GridViewRow currentRow =(GridViewRow)((TextBox)sender).Parent.Parent; TextBox txt = (TextBox)currentRow.FindControl("txtCode");
TextBox txtfine = (TextBox)currentRow.FindControl("txtFine");
Int32 count =Convert.ToInt32( txt.Text); var chkradio = rblQualification.SelectedValue; byte chkRadio = SafeConvert.ToByte(chkradio); var vehiclecategory = _service.GetAllVehicleCategory().Where(x => x.ID == chkRadio).FirstOrDefault(); var vehicletype = vehiclecategory.VehicleType_Id; var pntytype = _service.GetAllVehiclePenaltyType().Where(x => x.ID == SafeConvert.ToByte(count)).Count(); var plntyfee = _service.GetAllVehiclePenaltiesFee().Where(x => x.VehicleTypeID == vehicletype && x.VehiclePenaltyTypeID == vehicletype).FirstOrDefault(); txtfine.Text = plntyfee.Fee.ToString(); }
Manas MohapatraPosted Sep 28, 2015, 6:35 AM
Sajid HussainPosted Sep 28, 2015, 6:15 AM
Sajid HussainPosted Sep 28, 2015, 6:02 AM
Manas MohapatraPosted Sep 28, 2015, 5:34 AM
Sajid HussainPosted Sep 28, 2015, 5:30 AM
Sajid HussainPosted Sep 28, 2015, 5:30 AM
Manas MohapatraPosted Sep 28, 2015, 5:15 AM