Click here to Skip to main content
15,890,512 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRE:Role selection from ASP.Net Pin
grazza2110-Feb-09 6:08
grazza2110-Feb-09 6:08 
QuestionDynamically creating and positioning dropdown lists Pin
Mohammad A Gdeisat10-Feb-09 5:57
Mohammad A Gdeisat10-Feb-09 5:57 
Questioncreate asp.net graphs.... Pin
priyareguri10-Feb-09 3:59
priyareguri10-Feb-09 3:59 
AnswerRe: create asp.net graphs.... Pin
vaghelabhavesh10-Feb-09 4:43
vaghelabhavesh10-Feb-09 4:43 
AnswerRe: create asp.net graphs.... Pin
Abhijit Jana10-Feb-09 5:06
professionalAbhijit Jana10-Feb-09 5:06 
AnswerRe: create asp.net graphs.... Pin
Jon Rista10-Feb-09 5:52
Jon Rista10-Feb-09 5:52 
QuestionI need to calculate the sum of one of the columns on crystal report - Need help Pin
Slow Learner10-Feb-09 3:57
Slow Learner10-Feb-09 3:57 
QuestionSum or Total of a column in DataGrid changes when I click on Edit Row - Need help Pin
Slow Learner10-Feb-09 3:53
Slow Learner10-Feb-09 3:53 
Hi,

I am summing a column in my DataGrid and displaying total at the
footer with the below piece of code


If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then

'Snip out the ViewCount

Dim ContributionWithHeld As Integer = Convert.ToInt32(DataBinder.Eval(e.Item.DataItem, "ContributionWithHeld"))
myTotalContributionWithHeld += ContributionWithHeld

ElseIf e.Item.ItemType = ListItemType.Footer Then

e.Item.Cells(20).Text = "Total: " & String.Format("{0:#,###}", myTotalContributionWithHeld)
End If

and it works great and it dispaly the correct total when it binds the
data. But if I click on Edit row button in the grid then the Sum/Total
at the footer changes (deducts the value of that cell in that row from
the total). Looks like the the row that is in Edit mode is not being
taken into acount while summing the values.


Can some one help me with this how to change the above code or what I
else I need to do to display the Sum correct even if any of the rows
in Edit mode.


Also, the other thing I would like to be able to do is when a row in
Edit mode and as I change the value in the Cell that I would like
Sum , the Sum at the footer needs to be changed. May be I need to do
it under OnCellChange event but not sure where and how do I do it as I
never done this before.


Please help.


Thanks,


-L
AnswerRe: Sum or Total of a column in DataGrid changes when I click on Edit Row - Need help Pin
Slow Learner10-Feb-09 4:24
Slow Learner10-Feb-09 4:24 
Question[newbie] Boundaries by pixel Pin
jon-8010-Feb-09 3:41
professionaljon-8010-Feb-09 3:41 
QuestionHow to add extra Storage for blog Pin
Glossy10-Feb-09 3:24
Glossy10-Feb-09 3:24 
AnswerRe: How to add extra Storage for blog Pin
Christian Graus10-Feb-09 9:19
protectorChristian Graus10-Feb-09 9:19 
QuestionHow to add water mark text Pin
Glossy10-Feb-09 3:10
Glossy10-Feb-09 3:10 
AnswerRe: How to add water mark text Pin
vaghelabhavesh10-Feb-09 3:21
vaghelabhavesh10-Feb-09 3:21 
GeneralRe: How to add water mark text Pin
Glossy10-Feb-09 3:38
Glossy10-Feb-09 3:38 
QuestionHow to add avadar function to Blog Pin
Glossy10-Feb-09 3:01
Glossy10-Feb-09 3:01 
AnswerRe: How to add avadar function to Blog Pin
Christian Graus10-Feb-09 13:25
protectorChristian Graus10-Feb-09 13:25 
Questionget hyperlink id in codebehind Pin
kishorg110-Feb-09 2:58
kishorg110-Feb-09 2:58 
AnswerRe: get hyperlink id in codebehind Pin
Vasudevan Deepak Kumar10-Feb-09 3:01
Vasudevan Deepak Kumar10-Feb-09 3:01 
Questionhtml tag Pin
arkiboys10-Feb-09 2:34
arkiboys10-Feb-09 2:34 
AnswerRe: html tag Pin
Vasudevan Deepak Kumar10-Feb-09 2:47
Vasudevan Deepak Kumar10-Feb-09 2:47 
GeneralRe: html tag Pin
arkiboys10-Feb-09 2:50
arkiboys10-Feb-09 2:50 
QuestionPage Request Manager Error Pin
support synthesys10-Feb-09 2:03
support synthesys10-Feb-09 2:03 
Questionwhen stored procudere fire error how can i handle it? Pin
keyur satyadev10-Feb-09 2:00
keyur satyadev10-Feb-09 2:00 
AnswerRe: when stored procudere fire error how can i handle it? Pin
support synthesys10-Feb-09 2:04
support synthesys10-Feb-09 2:04 

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.