Is there a way to have the Ultra Grid only show complete rows when scrolling is enabled.
The top half of the bottom row is showing when I resize the form.
Thanks
Dan
I whipped up a quick CreationFilter that does this:
public class HidePartialRowsCreationFilter : IUIElementCreationFilter { #region IUIElementCreationFilter Members public void AfterCreateChildElements(UIElement parent) { // Keep a list of the row elements to be removed. We need to keep a // list because it's a bad idea to remove items from a collection // inside a foreach loop. List<UIElement> elementsToRemove =new List<UIElement>(); // Watch for the creation of the child elements of the // RowColRegionIntersectionUIElement. This is the element that contains // the RowUIElements. if (parent is RowColRegionIntersectionUIElement) { // Loop thruogh every child element. foreach (UIElement element in parent.ChildElements) { // Look for RowUIElements. if (element is RowUIElement) { // If the bottom of the row element is outside the // RowColRegionIntersectionUIElement, the add it to the // removal list. if (element.Rect.Bottom > parent.Rect.Bottom) elementsToRemove.Add(element); } } } // Loop through all the elements we added to the list and remove // them from the parent. foreach (UIElement elementToRemove in elementsToRemove) { parent.ChildElements.Remove(elementToRemove); } } public bool BeforeCreateChildElements(UIElement parent) { // Do Nothing return false; } #endregion }
Hi Dan,
No, there's no built-in way to do this. You might be able to acheive this using a DrawFilter to prevent the drawing of a partially-visible row.