I have a series of grids on a form, and all but the first one is created at runtime. Each grid has the same ValueChanged event handler attached to it. How can I tell which grid fired it?
private void ValueChanged(object sender, EventArgs e)
{
}
I tried intercepting the CellClick event (since that fires first) and getting the id from the tag property into a form-wide variable but that seems like a major kludge.
private async void CellClick(object sender, GridViewCellEventArgs e)
{
myTag = (int)((MasterGridViewTemplate)e.Column.OwnerTemplate).Owner.Tag;
}
Any better ideas?
Thanks
Carl
I'm afraid your approach didn't work. When I tried it both ActiveEditor properties were null. No matter, the approach I showed in my original post did work. However, maybe as a future enhancement the sender parameter should always have a reference to the control
Thanks
Carl