//***************************************************************************
        // Thread Callbacks
        //
        private void BeginSortCallback(IAsyncResult state)
        {
            BeginSortByValueDelegate    del1 = (state.AsyncState as BeginSortByValueDelegate);
            BeginSortByComparerDelegate del2 = (state.AsyncState as BeginSortByComparerDelegate);

            if (del1 != null)
            {
                del1.EndInvoke(state);
            }

            else if (del2 != null)
            {
                del2.EndInvoke(state);
            }

            this.OnSortComplete(EventArgs.Empty);
        }
        protected void BeginSort(string valueSortProperty, SortDirection dir)
        {
            BeginSortByValueDelegate del = new BeginSortByValueDelegate(this.Sort);

            del.BeginInvoke(valueSortProperty, dir, new AsyncCallback(this.BeginSortCallback), del);
        }