protected void RadDataPager1_PageIndexChanged(object sender, RadDataPagerPageIndexChangeEventArgs e)
{
show();
}
protected void RadDataPager1_TotalRowCountRequest(object sender, RadDataPagerTotalRowCountRequestEventArgs e)
{
AllClass.SearchDef Def = new AllClass.SearchDef();
Def.Business = this.RadBusi; Def.ProSeries = this.RadPro; Def.PtoTyp = this.RadPtoTyp;
Def.Disposal = this.RadDisposal; Def.STimd = this.TxtSTim.Text; Def.OTimd = this.TxtOTim.Text;
Def.ProCode = this.RadProCode;
Def.OilWay = this.RadOilWay.Text;
Def.STima = this.TxtSTim.Text;
Def.OTima = this.TxtOTim.Text;
string sc = "select count(*) from tbAss where(1=1) " + AllClass.getwa(Def);
int cnt = Convert.ToInt32(AllClass.ExecuteScalar(sc, con));
e.TotalRowCount = cnt;
}
string GenerateButtonText(string argument)
{
return String.Format("<span>{0}</span>", int.Parse(argument) + 1);
}
protected void RadDataPager1_FieldCreated(object sender, RadDataPagerFieldCreatedEventArgs e)
{
if (e.Item.Field is RadDataPagerButtonField && (e.Item.Field as RadDataPagerButtonField).FieldType == PagerButtonFieldType.Numeric)
foreach (IButtonControl ctrl in e.Item.Controls)
ctrl.Text = GenerateButtonText(ctrl.CommandArgument);
}
sometimes the event"RadDataPager1_PageIndexChanged" doesn't work. and the event"RadDataPager1_TotalRowCountRequest
" happens every post.I think you guys really have to see the modes of "AspNetPager".
"
{
show();
}
protected void RadDataPager1_TotalRowCountRequest(object sender, RadDataPagerTotalRowCountRequestEventArgs e)
{
AllClass.SearchDef Def = new AllClass.SearchDef();
Def.Business = this.RadBusi; Def.ProSeries = this.RadPro; Def.PtoTyp = this.RadPtoTyp;
Def.Disposal = this.RadDisposal; Def.STimd = this.TxtSTim.Text; Def.OTimd = this.TxtOTim.Text;
Def.ProCode = this.RadProCode;
Def.OilWay = this.RadOilWay.Text;
Def.STima = this.TxtSTim.Text;
Def.OTima = this.TxtOTim.Text;
string sc = "select count(*) from tbAss where(1=1) " + AllClass.getwa(Def);
int cnt = Convert.ToInt32(AllClass.ExecuteScalar(sc, con));
e.TotalRowCount = cnt;
}
string GenerateButtonText(string argument)
{
return String.Format("<span>{0}</span>", int.Parse(argument) + 1);
}
protected void RadDataPager1_FieldCreated(object sender, RadDataPagerFieldCreatedEventArgs e)
{
if (e.Item.Field is RadDataPagerButtonField && (e.Item.Field as RadDataPagerButtonField).FieldType == PagerButtonFieldType.Numeric)
foreach (IButtonControl ctrl in e.Item.Controls)
ctrl.Text = GenerateButtonText(ctrl.CommandArgument);
}
sometimes the event"RadDataPager1_PageIndexChanged" doesn't work. and the event"RadDataPager1_TotalRowCountRequest
" happens every post.I think you guys really have to see the modes of "AspNetPager".
"