After sorting with the radgrid then changing pages (or the reverse), I get: "index [pagesize] is either negative or above rows count."
The code is quite simple
The code is quite simple
| protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) |
| { |
| DataTable dt = dm.GetDtFromSQL(string.Format(SQLTemplate, ViewState["showID"]), "", ViewState["showID"].ToString(), false); |
| if (dt.Rows.Count > 0) |
| { |
| DataView dv = dt.DefaultView; |
| dv.RowFilter = ViewState["filter"].ToString(); |
| dv.Sort = string.Format("{0} {1}", ViewState["sort"], ViewState["order"]); |
| RadGrid1.DataSource = dv; |
| } |
| else |
| { |
| RadGrid1.DataSource = null; |
| } |
| } |