protected override void Dispose(bool disposing)
        {
            DataSource  = null;
            DataAdapter = null;

            if (fDefaultCellStyle != null)
            {
                fDefaultCellStyle.Dispose();
                fDefaultCellStyle = null;
            }

            if (fDefaultHeaderStyle != null)
            {
                fDefaultHeaderStyle.Dispose();
                fDefaultHeaderStyle = null;
            }

            if (Records != null)
            {
                Records.Clear();
                Records = null;
            }

            dataHelper = null;
            SortFields = null;

            if (Headers != null)
            {
                Headers.ClearHeaders(true);
                Headers = null;
            }

            base.Dispose(disposing);
        }
        public XRDataContainerControl()
        {
            fEvenCellStyleName = string.Empty;
            fOddCellStyleName  = string.Empty;
            fCellStyleName     = string.Empty;
            fHeaderStyleName   = string.Empty;

            Headers = CreateHeaders();

            fCellHeight    = 25f;
            CellAutoHeight = false;

            Records    = CreateDataRecords();
            dataHelper = CreateDataHelper();

            SortFields = new XRSortFieldCollection(this);

            InitializeDefaultStyles();
        }