>Using the jump start example customerorders.aspx form I set AllowPaging=true, PageSize=3. I have no code in PageIndexChanging and PageIndexChanged events. The page links appear but it never pages - no errors. Does this need some addition code ?
For paging, you can create a method which handles the PageIndexChanging() event of the GridView. Inside of this method, write code that does something like:
this.m_businessObject.GetAllData();
this.grdGridView.PageIndex = e.NewPageIndex;
this.DataBind();
For sorting, you can set the BindingSource to your business object name, the BindingSourceMember to something like TableName.DefaultView (replace TableName with the real table name).
Then create a method which handles the Sorting() event:
string sort = "ASC";
if (e.SortDirection == SortDirection.Descending)
{
sort = "DESC";
}
this.m_businessObject.GetAllData();
this.m_businessObject.DataSet.Tables[0].DefaultView.Sort = e.SortExpression + " " + sort;
this.DataBind();