Jump to content

Recommended Posts

Posted

I'm having some mental block here that is keeping me from being able to save viewstate in a gridview.

 

I'm using templates, and I've got a textbox on each row that should allow the user to enter some data.* Then, once they hit 'commit', I validate the data, and set another label on that row to 'valid/invalid' depending on the data.

 

The problem is, though, that I can't seem to figure out how to keep what they entered in that original text box.

 

Originally, I was trying to use a CustomValidator to serverside validate the code, but it was never showing 'invalid' and I suspect it is for the same reason.*

 

Is there some trick to forcing a gridview to keep the viewstate of it's controls?* My current solution is to save off the data when a postback occurs and reload it when the row is databound, but it feels klunky to me.

 

 

 

More...

 

View All Our Microsft Related Feeds

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...