Is there a way to keep the tags from being nulled as soon as I sort the grid?
If not, is the Tag property actually useful for anything except non-databound usage?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Based on you last question, you are setting the Tag of DataGridViewRow objects. And they might very well be re-created during a Sort operation. Use reflector to make sure, but I would start looking for a workaround.
In general, the Tag property is a last resort.
You could use a
Dictionary<object, object>to couple your data to thedgvr.DataBoundItemas key.