D
David Potahisnsky
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
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