protected void LoopRepeater(string _sort, int _start) { //ds = oCustomized.GetEnhancementUser(intProfile); ds = oCustomized.GetEnhancementUser(intProfile, strStatusIds, DateTime.Parse(txtStart.Text.Trim()), DateTime.Parse(txtEnd.Text.Trim())); if (_start > ds.Tables[0].Rows.Count) { _start = 0; } intRecordStart = _start + 1; if (ds != null && ds.Tables[0].Rows.Count > 0) { intRequest = Int32.Parse(ds.Tables[0].Rows[0]["requestid"].ToString()); } DataView dv = ds.Tables[0].DefaultView; if (Request.QueryString["sort"] != null) { dv.Sort = Request.QueryString["sort"]; } int intCount = _start + intRecords; if (dv.Count < intCount) { intCount = dv.Count; } int ii = 0; lblRecords.Text = "Requests " + intRecordStart.ToString() + " - " + intCount.ToString() + " of " + dv.Count.ToString(); for (ii = 0; ii < _start; ii++) { dv[0].Delete(); } int intTotalCount = (dv.Count - intRecords); for (ii = 0; ii < intTotalCount; ii++) { dv[intRecords].Delete(); } rptView.DataSource = dv; rptView.DataBind(); lblNone.Visible = (rptView.Items.Count == 0); _start++; }