| |

VerySource

 Forgot password?
 Register
Search
View: 677|Reply: 5

Data accumulation in Datagrid.

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 United States

Post time: 2020-2-8 15:00:01
| Show all posts |Read mode
I have a database table that stores forum post data. How can I display the operation of the Xth floor on the page? In the following code, the displayed value is the same each time.
<ItemTemplate> <% = X ++%> </ ItemTemplate>
How can I achieve it?
Reply

Use magic Report

0

Threads

23

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-3-31 18:30:01
| Show all posts
Before the data is bound to the DataGrid, a loop can be done in the background.
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-4-2 11:30:01
| Show all posts
<% # Container.ItemIndex + 1%>
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-4-2 19:15:01
| Show all posts
Do it in ItemCommound event
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 United States

 Author| Post time: 2020-4-2 22:00:01
| Show all posts
Is there a way to accumulate the data in the page file instead of in the background, thank you.
Reply

Use magic Report

0

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-4-2 22:30:01
| Show all posts
<% # Container.DataItemIndex + 1%>
Use the Label binding in the template column.
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