This is a migrated thread and some comments may be shown as answers.

raddatapager really has tons of problems

1 Answer 18 Views
DataPager
This is a migrated thread and some comments may be shown as answers.
C
Top achievements
Rank 1
C asked on 06 Sep 2013, 02:31 PM
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".

"

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 11 Sep 2013, 01:40 PM
Hi,

Can you provide a runnable demo where I can reproduce the problem?

Regards,
Daniel
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
DataPager
Asked by
C
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or