| |

VerySource

 Forgot password?
 Register
Search
View: 1151|Reply: 9

Suspected as a bug in GridView

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-26 07:00:01
| Show all posts |Read mode
When combining objectdatasource and gridview (the non-automatic paging used is a custom paging written by yourself), if the amount of data is very large, it may reach a thousand or so, and the number of paginated pages reaches dozens or hundreds (mine is 88) Page), when the pagination method is changed to numericfirstlast, when clicking the last page button, there will be an "Arithmetic operation caused an overflow" exception, and then after more than one hour of debugging, I found that the page was passed to GRIDVIEW after clicking the last page The number is 2147483647, which reaches the maximum value of Integer.
Then use ACCESSDATASOURCE as the data source, let gridview use its own paging, but found that everything is normal, and found that the value passed to GRIDVIEW is correct in the paging event.

I suspect it is a bug when GRIDVIEW is combined with OBJECTDATASOURCE, and it is most likely not related to my coding. Because no matter what data source I used, I didn't modify the loopback behavior after clicking the button on the last page at all.

Why is that? Has anyone encountered this situation?
Can masters test it?
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-16 15:15:01
| Show all posts
Passing by.

I have never used Gridview. Sorry, huh!

Ask the landlord to use fewer of these controls and consider more performance
Reply

Use magic Report

0

Threads

58

Posts

32.00

Credits

Newbie

Rank: 1

Credits
32.00

 China

Post time: 2020-2-16 22:00:01
| Show all posts
Haven't tried it yet.
Reply

Use magic Report

0

Threads

26

Posts

20.00

Credits

Newbie

Rank: 1

Credits
20.00

 China

Post time: 2020-2-20 16:15:01
| Show all posts
The GridView control is fast. Someone said that it would affect performance? I don't think so, especially the page turning function, but it will be faster.
Reply

Use magic Report

0

Threads

25

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-2-23 09:15:01
| Show all posts
The GridView control doesn't really know how to get a new page, it just requests the bound data source control to return the appropriate number of page rows. Paging is ultimately done by the data source control.
When it is bound to an objectdatasource control, the paging mechanism depends on the capabilities of the business objects we connect to (depending on the underlying business and data access layer (DAL) function paging).
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-4-10 16:00:01
| Show all posts
The problem is that when I debug, I find that gridview does not overflow at all when an error occurs.
Could it be that my OBJECTDATASOURCE has an error getting the total number of records? But if you click…, that is, the next 10 pages or no matter how many pages are normal.
why? God give me an answer
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-3 13:00:01
| Show all posts
You are a master, this has not been built. . .
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-3 13:15:01
| Show all posts
Large amounts of data are generally paged by stored procedures,
Used objectdatasource as the data source of gridview, and used stored procedure paging,
completely fine!!
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-3 13:30:01
| Show all posts
No need to doubt, you must have made some extremely low-level mistakes yourself. Check carefully.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-3 14:45:01
| Show all posts
Check the code carefully, it may be your own carelessness
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