Hi,
I have a fixed AddRow at the top of the grid. I have SupportDataErrorInfo set to RowsAndCells, but I don't want the error info showing up when you activate the AddRow only when the grid tries to add the row.
Thanks
I checked into this, because I wasn't sure if it was possible. The only way I could find that might work is to use a DrawFilter or a CreationFilter to stop the drawing or creation of the error image elements.
I had the same issue and using this code in a CreationFilter helped:
bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent)
{
RowUIElement rowElem = parent.GetAncestor(typeof(RowUIElement)) as RowUIElement;
if(rowElem == null || rowElem.Row.IsAddRow == false)
return false;
if(parent is DataErrorIconUIElement)
parent.Parent.ChildElements.Remove(parent);
foreach (UIElement sibling in parent.Parent.ChildElements)
if (sibling is EmbeddableUIElementBase)
Rectangle gp = parent.Parent.Rect;
sibling.Rect = new Rectangle(gp.X,
sibling.Rect.Y,
sibling.Rect.Width + parent.Rect.Width,
sibling.Rect.Height);
}