Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
Remove the line beneath UltraListViewGroup
posted

Hi

How to remove the line beneath UltraListViewGroup name? I have attached the screenshot for better understanding. The screenshot is having 3 listviews that are getting populated if the data exists in backend. 

Please help... Its quite urgent...

Thanks in advance.

  • 69832
    Suggested Answer
    Offline posted

    Assign an instance of this class to the control's CreationFilter property:
    public class GroupLineRemoverCreationFilter : IUIElementCreationFilter
    {
        public GroupLineRemoverCreationFilter()
        {
        }

        void IUIElementCreationFilter.AfterCreateChildElements(UIElement parent)
        {
            UltraListViewGroupUIElement groupElement = parent as UltraListViewGroupUIElement;
            if ( groupElement != null )
            {
                UltraListViewGroupHeaderLineUIElement lineElement =
                    groupElement.GetDescendant( typeof(UltraListViewGroupHeaderLineUIElement) )
                    as UltraListViewGroupHeaderLineUIElement;

                if ( lineElement != null )
                    groupElement.ChildElements.Remove( lineElement );
            }
        }

        bool IUIElementCreationFilter.BeforeCreateChildElements(UIElement parent)
        {
            return false;
        }
    }