I have a datagrid that, when edited, needs to be validated. I've dynamically added the validators in code and have them validating the appropriate textboxes within the cell. I had to change the ID of the textbox in order to get the validation control to work (I think this is the problem) -- otherwise the control to validate property was blank, because the ID property of the textbox was blank.
Anyway, everything works like a dream... UNTIL I update. When that happens, the textbox objects are still there, but their IDs are gone... and so is their data. This is a perplexing problem that I'm not used to. I've read about using template columns, but I'm not sure how to do that in this context, and I prefer using codebehind pages as much as possible.
Are there any solutions to this problem or have I gone down a one way dead end street...? THanks for the helpcan you please post the code so that we can help you
I fixed the problem by using template columns in place of standard columns.
No comments:
Post a Comment