Unplanned
Last Updated: 05 Mar 2024 14:11 by Stenly

The FilterColumn method does not position the filtering popup on the passed column index when it is opened.

A workaround to this behavior would be to manually position the filtering popup using the following approach:

this.virtualGrid.FilterColumn(2);

var virtualizingCanvasBase = this.virtualGrid.ChildrenOfType<VirtualizingCanvasBase>().FirstOrDefault();

var columnsRenderInfoInfo = virtualizingCanvasBase.GetType().GetProperty("ColumnsRenderInfo", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

var columnsRenderInfo = columnsRenderInfoInfo.GetValue(virtualizingCanvasBase);

var offsetMethodInfo = columnsRenderInfo.GetType().GetMethod("OffsetFromIndex");

var filteringPopupPropertyInfo = this.virtualGrid.GetType().GetProperty("FilteringPopup", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

Popup filteringPopup = (Popup)filteringPopupPropertyInfo.GetValue(this.virtualGrid);

filteringPopup.HorizontalOffset = (double)offsetMethodInfo.Invoke(columnsRenderInfo, new object[1] { 2 });

The FilterColumn method should be called, in order for the filtering Popup to be created.

Unplanned
Last Updated: 15 Nov 2023 12:26 by Martin Ivanov
The FilteringControl of a column filters a wrong column when an ItemPropertyInfo is inserted at runtime. The newly inserted property info should create a column placed between other columns (not at the end of the view). The new column filtering is wrong.