|
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
|
|
|
|
|
HI,
Looks like it also works good as expected when I changed the If statement to include 'Or e.Item.ItemType = ListItemType.EditItem' at the end. So I am good with the Sum/Total now. But when I change the Cell I would like the Total/Sum also be changed. Any help appreciated.
Thanks,
-L
|
|
|
|
|
The following code snippet defines a hotspot which the user can click and where conditions can be created depending on the postback value.
Are there any tools or libraries in order to show the boundaries visually rather than counting the pixels?
<form id="form1" runat="server">
<asp:imagemap id="Imagemap1" runat="server" imageurl="Kids.jpg" xmlns:asp="#unknown">
Width="300" OnClick="Imagemap1_Click" HotSpotMode="PostBack">
<asp:rectanglehotspot top="0" bottom="225" left="0" right="150">
AlternateText="Sofia" PostBackValue="Sofia">
</asp:rectanglehotspot>
<asp:rectanglehotspot top="0" bottom="225" left="151" right="300">
</asp:rectanglehotspot></asp:imagemap></form>
Jon
|
|
|
|
|
Hi friends,
Am creating a blog for the website. In this how can i add extra storage?
For understanding:
If we find ourself running out of space, it’s easy to add more storage to our blog.
we can add 5, 15, or 25 gigabytes to your blog,
So that we can add more pictures, videos to it.
For this what i want to do?
Give some idea
----
Glossy**
|
|
|
|
|
Well, if your users can all add 25 gig, you need some huge hard drives. I'd imagine at the end of the day, it would all be virtual, with all the content stored in a database, and the 'space' equating to a running total of how much DB space they have taken up and therefore how much they have left.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi friends,
How to add water mark text to the search textbox?
Do we want to use ajax for it?
----
Glossy**
|
|
|
|
|
|
Thank you yogi
----
Glossy**
|
|
|
|
|
Hi friends,
How to add avadar function to Blog in the website.
Am doing it in asp.net 3.5 (C# application)
Give some idea
Thank you
----
Glossy**
|
|
|
|
|
You want to store a users image, and associate it with the user. Then you want an img tag pointing to that image ( probably streaming it from your DB ). Which bit is hard ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i have master page, on which i have different hyperlink
in codebehing, how i will access click hyperlink id??
i want current click hyperlink id in codebehind
|
|
|
|
|
If it is link button, then the sender argument would help you with that right?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Hi,
There is a label control on .aspx
The text "hello" comes from database i.e.
label1.text = "hello";
Note that, I do not have permission to change the UI code.
I would like to alter the value of the field in the table to show the text as bold i.e.
To have the text displayed as highlighted i.e. bold, I manually modified the text inside the field of the table to show
hello
Is this ok?
It does not seem to work because in the label control I see:
hello
Any thoughts please?
Thanks
|
|
|
|
|
The label renders as a span tag. Did you try manipulating it from JavaScript?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep!
|
|
|
|
|
Not sure.
Note that I do not have permission to change the UI code.
I can only change the database if required.
Thanks
|
|
|
|
|
hello,
While accessing the website at client side i am facing following errors:-
1. Sys.Forms.PageRequestManagerServerErrorException:An unknown error occured while processing the request on the server. The status code returned from the server was: 400
2. Sys.Forms.PageRequestManagerServerErrorException:An unknown error occured while processing the request on the server. The status code returned from the server was: 12152
I have tried so many options but finally i format the server and reconfigured it but still problem is still there.
please help out,
thanks in advance.
|
|
|
|
|
i am using stored procedure in my database class. suppose it(stored procedure) will give error
so how can i handle error?
|
|
|
|
|
by using raiserror in stored procedure.
|
|
|
|
|
I have several aspx forms in which I would like to change the postback behavior. The forms allow for paging and when I enter a new record the form posts back to the first record in the set instead of the record I just entered. Is there a way to change this? When I edit a record it posts back to the record I just editted. I would like the same behavior for a new record as well because several of my forms have a "sub-form" where I need to enter additional info and paging thru the records is a pain, or worse, I put the subform info with the wrong record. Below is the code from one of my forms. TIA - BJH
<asp:formview id="FormView1" runat="server" datakeynames="LocationID" datasourceid="FacilitySqlDataSource" allowpaging="True" xmlns:asp="#unknown"><br />
<edititemtemplate><br />
<table><br />
<tr><br />
<td><br />
LocationID:<br />
</td><br />
<td><br />
<asp:label id="LocationIDLabel" runat="server" text="<%# Eval("LocationID") %>"><br />
</asp:label><br /><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
LocationName:<br />
</td><br />
<td><br />
<asp:textbox id="LocationNameTextBox" runat="server" text="<%# Bind("LocationName") %>"><br />
</asp:textbox><br /><br />
</td><br />
</tr><br />
</table><br />
<br /><br />
<asp:linkbutton id="UpdateButton" runat="server" causesvalidation="True" commandname="Update"><br />
Text="Update"><br />
</asp:linkbutton><br />
<asp:linkbutton id="UpdateCancelButton" runat="server" causesvalidation="False" commandname="Cancel"><br />
Text="Cancel"><br />
</asp:linkbutton><br />
</edititemtemplate><br />
<insertitemtemplate><br />
<table><br />
<tr><br />
<td><br />
LocationID:<br />
</td><br />
<td><br />
<asp:label id="LocationIDLabel" runat="server" text="New"><br />
</asp:label><br /><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
LocationName:<br />
</td><br />
<td><br />
<asp:textbox id="LocationNameTextBox" runat="server" text="<%# Bind("LocationName") %>"><br />
</asp:textbox><br /><br />
</td><br />
</tr><br />
</table><br />
<br /><br />
<asp:linkbutton id="InsertButton" runat="server" causesvalidation="True" commandname="Insert"><br />
Text="Insert"><br />
</asp:linkbutton><br />
<asp:linkbutton id="InsertCancelButton" runat="server" causesvalidation="False" commandname="Cancel"><br />
Text="Cancel"><br />
</asp:linkbutton><br />
</insertitemtemplate><br />
<itemtemplate><br />
<table><br />
<tr><br />
<td><br />
LocationID:<br />
</td><br />
<td><br />
<asp:label id="LocationIDLabel" runat="server" text="<%# Eval("LocationID") %>"><br />
</asp:label><br /><br />
</td><br />
</tr><br />
<tr><br />
<td><br />
LocationName:<br />
</td><br />
<td><br />
<asp:label id="LocationNameLabel" runat="server" text="<%# Bind("LocationName") %>"><br />
</asp:label><br /><br />
</td><br />
</tr><br />
</table><br />
<br /><br />
<asp:linkbutton id="EditButton" runat="server" causesvalidation="False" commandname="Edit"><br />
Text="Edit"><br />
</asp:linkbutton><br />
<asp:linkbutton id="NewButton" runat="server" causesvalidation="False" commandname="New"><br />
Text="New"><br />
</asp:linkbutton><br />
</itemtemplate><br />
</asp:formview>
|
|
|
|
|
u have to use formview and use insert and edit template for insert and update
respectively. bound linkbutton for delete and execute delete query when link of delete
will click.
keyur satyadev
|
|
|
|
|
Are you asking us or you are telling us ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
send file to browser
response.redirect("~/doc/filename.xls");
keyur satyadev
|
|
|
|
|
Report1
when i click the above link button the excel document report1 is opened...
it located in my project itself...
now my need is if i click the link button...
i have to open a excel doc located in my D:
how can do this
help me...
|
|
|
|
|
Why are creating a new post as replying for a post?
Apurva Kaushal
|
|
|
|
|
wats its code i also want to do it on link button click
|
|
|
|