Click here to Skip to main content
15,904,024 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionASP.NET Gridview DataBound event retaining previous value Pin
Inderjeet Kaur26-Aug-09 21:52
Inderjeet Kaur26-Aug-09 21:52 
AnswerRe: ASP.NET Gridview DataBound event retaining previous value Pin
Arun Jacob26-Aug-09 23:02
Arun Jacob26-Aug-09 23:02 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Inderjeet Kaur26-Aug-09 23:25
Inderjeet Kaur26-Aug-09 23:25 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Ibrahim Bello27-Aug-09 2:00
Ibrahim Bello27-Aug-09 2:00 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value [modified] Pin
Inderjeet Kaur27-Aug-09 16:53
Inderjeet Kaur27-Aug-09 16:53 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Ibrahim Bello27-Aug-09 21:00
Ibrahim Bello27-Aug-09 21:00 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Inderjeet Kaur27-Aug-09 21:29
Inderjeet Kaur27-Aug-09 21:29 
GeneralRe: ASP.NET Gridview DataBound event retaining previous value Pin
Ibrahim Bello27-Aug-09 23:07
Ibrahim Bello27-Aug-09 23:07 
1. Why not do your pagination in the PageIndex_Changing event of the gridview rather than in the RowCommand event?

2. Where you have:

for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
String feeID = ds.Tables[0].Rows[i]["TRANTYPEID"].ToString();
Decimal feeAmount = Convert.ToDecimal(ds.Tables[0].Rows[i]["TRANSACTIONAMOUNT"]);


you can substitute with:

int pageOffset = 10 * gvCardFeesRReport.PageIndex;

for (int i = 0; i < gvCardFeesRReport.Rows.Count - 1; i++)
{
String feeID = ds.Tables[0].Rows[i + pageOffset]["TRANTYPEID"].ToString();
Decimal feeAmount = Convert.ToDecimal(ds.Tables[0].Rows[i + pageOffset]["TRANSACTIONAMOUNT"]);


3. If all these don't work, try populating your gridview programmatically to achieve more control over your data.

Hope this helps
Questionmessagebox Pin
ankitjain111026-Aug-09 21:50
ankitjain111026-Aug-09 21:50 
AnswerRe: messagebox Pin
ankitjain111026-Aug-09 21:59
ankitjain111026-Aug-09 21:59 
GeneralRe: messagebox Pin
Coding C#26-Aug-09 22:22
Coding C#26-Aug-09 22:22 
GeneralRe: messagebox Pin
ankitjain111026-Aug-09 22:34
ankitjain111026-Aug-09 22:34 
GeneralRe: messagebox Pin
Coding C#26-Aug-09 22:39
Coding C#26-Aug-09 22:39 
GeneralRe: messagebox Pin
ankitjain111026-Aug-09 22:57
ankitjain111026-Aug-09 22:57 
GeneralRe: messagebox Pin
ankitjain111026-Aug-09 23:15
ankitjain111026-Aug-09 23:15 
QuestionHow to set CustomValidor for FileUpload Pin
shaik_mr26-Aug-09 21:27
shaik_mr26-Aug-09 21:27 
AnswerRe: How to set CustomValidor for FileUpload Pin
Ibrahim Bello27-Aug-09 1:20
Ibrahim Bello27-Aug-09 1:20 
QuestionAdding values to data gridview programmatically Pin
myinstincts26-Aug-09 21:26
myinstincts26-Aug-09 21:26 
Questionwhile using blank file , fileUpload doesn't work. Pin
Priyagdpl26-Aug-09 21:14
Priyagdpl26-Aug-09 21:14 
AnswerRe: while using blank file , fileUpload doesn't work. Pin
Arun Jacob26-Aug-09 21:33
Arun Jacob26-Aug-09 21:33 
GeneralRe: while using blank file , fileUpload doesn't work. Pin
Priyagdpl26-Aug-09 21:44
Priyagdpl26-Aug-09 21:44 
Questionthere is no source code available for the current location Pin
haleemasher26-Aug-09 21:13
haleemasher26-Aug-09 21:13 
AnswerRe: there is no source code available for the current location Pin
Arun Jacob26-Aug-09 21:22
Arun Jacob26-Aug-09 21:22 
AnswerRe: there is no source code available for the current location Pin
haleemasher26-Aug-09 21:27
haleemasher26-Aug-09 21:27 
Questionscripts in adrotator control? Pin
Member 387988126-Aug-09 21:06
Member 387988126-Aug-09 21:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.