Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > retrieve PageCount of DataGrid

Reply
Thread Tools

retrieve PageCount of DataGrid

 
 
David Potahisnsky
Guest
Posts: n/a
 
      11-07-2003
I have ASPX page with DataGrid object. To fill this object I use DataTable

that contain result of stored procedure. In my case it's about 300 rows.



I would like to display this table with paging.



This is code to retrieve table:



DataTable dtMainTable = null;

DataSet Ds = SqlHelper.ExecuteDataset(strConnectionString,

CommandType.StoredProcedure, "a_test_procedure", null);

Ds.Tables[0].TableName = "PermissonFunctions";

dtMainTable = Ds.Tables[0];





this is code for data bind of datagid:



ReportGrid.DataSource = dtMainTable;

ReportGrid.AllowPaging = true;

ReportGrid.CurrentPageIndex = 0;

ReportGrid.DataBind();







This code displays cool table on ASPX page.



My problem is that I need to display the total number of pages that could be
displayed.



I'm trying to use:



ReportGrid.PageCount, but any time returns me zero (0). Please help me to

retrieve PageCount.







Thank you, David Potahinsky


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Paging in Datagrid-Pagecount is always 1 anon ASP .Net 0 05-10-2004 04:38 PM
Re: Problems facing in datagrid pagecount Daniel Joskovski MCSD 0 04-08-2004 10:14 PM
Re: Problems facing in datagrid pagecount Daniel Joskovski MCSD 0 04-07-2004 12:40 AM
Datagrid PageCount Nightmare!! Dave ASP .Net 4 11-13-2003 10:16 PM
retrieve PageCount of DataGrid David Potahisnsky ASP .Net 0 11-07-2003 06:32 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57