I have a BulkEditGridView inside an Update panel and have the following issue:
I have a texbox linked to a int column in the database. I use a CustomValidator to check if the inserted value is, in fact, an int. In adition, users should be able to introduce "NR" if they can't respond. It is the CustomValidator's job to see if the text is an int or NR. In the later case, it should change the textbox value from NR to "-1000", a code that represents NR in the database.
It works fine without the UpdatePanel, but once I use this panel it stops working, because apparently it can't seem to change the Textbox's value to -1000. The code that makes the switch is:
public void testNANRNumberFormatBGV(Page page, string textBoxControlName, GridView gv, ServerValidateEventArgs args)
{
if (args.Value == "NR")
{
TextBox tb = (TextBox)gv.FindControl(textBoxControlName);
tb.Text = "-1000";
args.IsValid = true;
}
} Does anyone have any ideas on why this happens?