| |

VerySource

 Forgot password?
 Register
Search
View: 963|Reply: 6

DataGrid has automatic paging? ? How to use it, talk about it?

[Copy link]

5

Threads

19

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2019-12-27 17:33:55
| Show all posts |Read mode
I heard: DataGrid has automatic paging? ?

 How to use it, talk about it?
Can you tell me, I just learned a few days: DataGrid.
Not quite right, do you want to ask? ? ?

Thank you for your help, thank you
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2019-12-27 17:39:28
| Show all posts
HTTP://woohoo.cn blog.com/Huazi4995/archive/2006/12/30/608111.HTML
Reply

Use magic Report

1

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-2 20:24:01
| Show all posts
Write in the PageIndexChanged event of the datagrid
E.g
private void dgGood_PageIndexChanged (object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
if (Session ["dgGoodsDS"]! = null)
ds = (ICollection) Session ["dgGoodsDS"];
this.dgGood.CurrentPageIndex = e.NewPageIndex;
this.dgGood.DataSource = ds;
this.dgGood.DataBind ();
}
Reply

Use magic Report

2

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-2 21:06:01
| Show all posts
Is it written like this?
Reply

Use magic Report

3

Threads

14

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-2 22:27:01
| Show all posts
private void dgGood_PageIndexChanged (object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
this.dgGood.CurrentPageIndex = e.NewPageIndex;
this.dgGood.DataSource = ds;
this.dgGood.DataBind ();
}
I use it like this
Reply

Use magic Report

0

Threads

13

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-1-3 17:27:01
| Show all posts
DataGrid does not have the function of automatic paging. You must write your own paging event handlers, otherwise you cannot page.

=========================
www.webdiyer.com
Reply

Use magic Report

0

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-3 18:06:01
| Show all posts
datagrid.autopage = true
in the event of pageindexchanged
datagrid.currentpageindex = e.newpageindex
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list