c# - Error Panel Row Updating -
i want show error panel on row updating not show error panel. what's wrong code?
protected void grades_gridview_rowupdating(object sender, gridviewupdateeventargs e) { string lettergrade = grades_gridview.datakeys[e.rowindex].values["letter_grade"].tostring(); textbox txtmingrade = (textbox)grades_gridview.rows[e.rowindex].findcontrol("txtmingrade"); textbox txtmaxgrade = (textbox)grades_gridview.rows[e.rowindex].findcontrol("txtmaxgrade"); if (convert.todecimal(txtmingrade.text) > convert.todecimal(txtmaxgrade.text)) { panelerror.visible = true; labelerrorstring.text = "minimum grade must not greater maximum grade!"; } else { admin.updategraderanges(lettergrade, txtmingrade.text, txtmaxgrade.text); } grades_gridview.editindex = -1; fillgraderangesingrid(); }
Comments
Post a Comment