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?
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?
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 the dgvr.DataBoundItem
as key.