示例#1
0
        protected void dataBind(string sortExp, int pageIndex, FZGrid grid)
        {
            int totalRecords = 0;

            grid.PageSize = Utils.Configuration.PageSize;
            //List<T> list = IsManagerObject ? _contextManager.Search(SearchObject, Utils.Configuration.PageSize, pageIndex, out totalRecords, sortExp, grid.SortOrder)
            //                               : _context.Search(SearchObject, Utils.Configuration.PageSize, pageIndex, out totalRecords, sortExp, grid.SortOrder);

            List <T> list = _contextManager.Search(SearchObject, Utils.Configuration.PageSize, pageIndex,
                                                   out totalRecords, sortExp, grid.SortOrder);

            grid.DataSource = list;
            grid.CustomCustomVirtualItemCount = totalRecords;
            grid.DataBind();
        }
示例#2
0
 protected void clearBinding(FZGrid grid)
 {
     grid.DataSource = null;
     grid.DataBind();
 }