/// <summary>
 /// RefreshData method implmentation
 /// </summary>
 public void RefreshData(bool refreshgrid = false, bool clearselection = false)
 {
     this.UseWaitCursor = true;
     this.Cursor        = Cursors.WaitCursor;
     try
     {
         _lst = ManagementAdminService.GetUsers();
         if (clearselection)
         {
             this.GridView.RowCount = 0;
         }
         this.GridView.RowCount = ManagementAdminService.GetUsersCount();
         if (refreshgrid)
         {
             this.GridView.Refresh();
         }
         if (clearselection)
         {
             // this.GridView.ClearSelection();
         }
     }
     finally
     {
         this.UseWaitCursor = false;
         this.Cursor        = Cursors.Default;
     }
 }
        /// <summary>
        /// EnsurePageForRowIndex method implmentation
        /// </summary>
        private int EnsurePageForRowIndex(int rowindex)
        {
            int idx  = rowindex % ManagementAdminService.Paging.PageSize;
            int page = (rowindex / ManagementAdminService.Paging.PageSize) + 1;

            if (page != ManagementAdminService.Paging.CurrentPage)
            {
                this.UseWaitCursor = true;
                this.Cursor        = Cursors.WaitCursor;
                try
                {
                    ManagementAdminService.Paging.CurrentPage = page;
                    _lst = ManagementAdminService.GetUsers();
                }
                finally
                {
                    this.UseWaitCursor = false;
                    this.Cursor        = Cursors.Default;
                }
            }
            return(idx);
        }