|
Private sum As Integer = 0
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
sum = 0
For i As Integer = 0 To e.Row.Cells.Count - 1
sum += e.Row.Cells(i).Text
Next
Dim tc As New TableCell
tc.Text = sum
e.Row.Cells.AddAt(e.Row.Cells.Count, tc)
End If
End Sub
this will create one new colmn containing sum of coresponding row cells
ex:
col1 col2 col3 sum
1 2 3 6 (= 1+2+3)
4 5 6 15 (= 4+5+6)
hope this is what u wanna do
|
|
|
|
|
Check out this:
http://aspalliance.com/782[^]
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
thanks for ur code link.... i need to add the gridview column and display the values in another column... how to do this
|
|
|
|
|
Wouldn't that article serve as a starting point for your weaving the spider web?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
hi,
There is the requirement, please write the step-by-step procedure to create web setup in .NET without giving source code with the setup.
Thanks in advance
-- modified at 0:17 Friday 30th November, 2007
|
|
|
|
|
If it's .NET 2.0, you need to set it up to build all the code in a dll. Of course, anyone can read the code, if they have the dll.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: Of course, anyone can read the code, if they have the dll.
Reflection? I remember that there is one guy who is asking about this in our forum. What he said that the dlls of his BO are viewable by using Reflector. But i think that there will be some differences between the original code and the code generated by reflector.
|
|
|
|
|
|
Is there close event in web application or there is any other event corresponding to close event?
|
|
|
|
|
Not really. There's an event in the browser, but it's not sent to the server. You can send it to the browser with AJAX, but it's probably wiser to explain what you want to achieve, so we can suggest common ways of achieving it
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Smithakrishnan wrote: close event
No. You can just close the browser using window.close() and the web browser would offer to undertake your order after getting a nod/consent from the user.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
iam having a server image button .with some image ..now i want to change the image url of the image buttton using javascript
|
|
|
|
|
If it's a server side control, it's Id in not the Id you specified, unless it has no controls above it in the tree. Write a js variable into your page with the ClientID, then you can use that the same as you would the id of any img tag with js.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
jagadeeshkumar2106 wrote: server image button
For the Image Button's ClientID, you can use document.getElementByID function in JavaScript to set a new Image appropriately.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Except, like I said, if it's a server control, he won't know the client Id at the point of writing the code, it can change depending on where the control is in the page control tree.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi all
i have a problem with child window.
i have a child window with the name brand.aspx
In brand page iam adding a new brand and then exiting form the page.
and now i have a brand dropdown in parent window...
after exiting form the child window newly entered brand is not immediately binding to the brand dropdown in parent window.
if i refresh the page then it is adding but i want to bind immediately
this is the code i wrote in child window exit button
Page.ClientScript.RegisterStartupScript(Me.[GetType](), "close", "self.close();")
can u help me in this issue...
Thanks in advance
siri
|
|
|
|
|
U will have to do like this on parent window:
var winSettings = "dialogWidth:400px;dialogHeight:250px; help: no; status: no;directories:no,menubar:no";
var values = window.showModalDialog("brand.aspx?no=" + brandno + "&name=" + brandname, " ", winSettings);
if(values == 1)
{
window.location.reload();
}
so that it will refresh the page accordingly...
Hope it solves ur problem....
|
|
|
|
|
You just need to write some javascript into the body tag of the pop-up page after the submit has been processed, like this:
If <<record added="" test="">> Then
Response.Write ""
Response.Write ""
Response.Write ""
Else
see link http://p2p.wrox.com/topic.asp?TOPIC_ID=5956
Bindiya
|
|
|
|
|
in child window java script u write
window.opener.document.getElementbyid("parentcontrl").value=child control value
|
|
|
|
|
How to limit quantity of the chosen items in checkboxlist ?
thx
stepan
|
|
|
|
|
Javascript. The way I'd do this is to add an oncheckchanged ( or whatever it is ) event to each checkbox, and keep count of how many items have been checked. IF too many are checked, reject the click and show a message.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I would like to find out how to convert HtmlTextWriter to either a string or a stream? I am working with an application that requires this to be either in a string or stream format and I can't seem to accomplish this. ToString only gives me the object name. Any assistance would be appreciated. Current language is C# but VB is fine.
Thanks,
Leo T. Smith
Senior Programmer/Analyst
|
|
|
|
|
I would like to add one thing. All I am trying to get is the whole page response file in a string before I send it to the browser. I really don't want to iterate through all the controls and build the page manually.
Thanks,
Leo
Leo T. Smith
|
|
|
|
|
Are you trying to get the full raw HTML response for the entire page or for just a control?
|
|
|
|
|
Yes I want the complete raw html, like you would see in a text editor, or by going view source.
Thanks,
Leo T. Smith
|
|
|
|