display the sum of two datagrid columns into third column
i have a datagrid with columns named Price ,Quantity and total. now in the total column i wanna display the prices which comes by multiplyiing the price and quantity (like total=Price * quantity). I'm workin in asp.net +vb.net.
may i knw hw can i do this.. plz write the code..
Hi, do like this..suppose u have, string ProductPrice = ...How to subtract two date columns(bound) of a Datagrid and display the result in the third column?
Hi Everyone,I have two date columns(databound-coming from SQL database) in my datagrid, 'start date' & 'end date'. I need to calculate number of days with 'end date- start date' and display the result in the third datagrid column. i.e.: column2-column1 = column3Any help anyone?...ASAP please got a deadline to meet :) (SOS!!!)Many Thanks in advance,Arty.Aartee...we live more than once!
Hi, there are several ways of doing it. One of them is creating a label in the TemplateColumn, use the Helper function to calculate the number of days.<ItemTemplate> <...How to subtract two numeric columns(bound) of a Datagrid and display the result in the third column?
Hi Everyone,I have two numeric columns(databound-coming from SQL database) in my datagrid, 'PromoPrice' & 'CostPrice'. I need to calculate 'PromoPrice- CostPrice' and display the result in the third datagrid column. i.e.: column2-column1 = column3Any help anyone...Many Thanks in advance,Nico.
In your query do this:Select .... , (PromoPrice - CostPrice) AS Answer, .....FROM yourTableKeep in mind you can do math functions in queries.DarmarkMark as Answer, if this reply answers your post.
Hi Darmark, thanks for your fast answer.The fact is I'm using a single "select function"...How to display the sum of a column at the footor of the datagrid column
Any idea how I can display the Sum of any column at the Footor of that Column.
HighOnCodingWanna get high!
Take a look @ Displaying Column Summary Information in the Footer
K B ShajudeenAreYaar.comDubai, United Arab Emirates....how to put column values as column headers in datagrid
I am trying to develop a report. Basically we have two tables named A and B.
In Table A we have columns
In Table B we have columns
I have written a join select statement to get the DelivDesc, StartDate, Enddate
so the result would be like
DelivDesc StartDate EndDate
Tiering1 8/31/2004 9/20/2004
Tiering2 8/31/2004 9/20/2004
Tiering3 8/31/2004 9/20/2004
Tiering4 8/31/2004 9/20/2004
I need my datag...how to split the content of one column in the objectdatasource into two parts and let them display in two columns in the GridView?
i combine the title and the body of one article and store it in one column in the database,but i want to show the title and body seperately in the GridView,how should i achieve this goal?thank you so much for your advice!!!
you can write the logic of splitting the column into two (title and body) in the query itself by which you are filling the datasource..Thanx, [KaushaL] || BloG || Profile || Microsoft MVP"I would love to change the world, but they won’t give me the source code"Don't forget to click "Mark as Answer" on the post that helped you.This credits that me...Column span for Header in Datagrid
I am using datagrid control and let me know how to implement column span for Header.
And Also how to merge all the columns in Datagrid....Datagrid with two column headers
I have a 10 row dataset that I want to bind with a datagrid. Of these 10 rows, 3 rows have featured products listing in them. I want to display these 3 products at the top of the grid. Now, after these 3 "featured" rows in the datagrid, I want to display the datagrid column header again. The remaining 7 rows should follow this second header.Is this possible to do with datagrid?
I suspect there is a way but here is an alternate suggestion. Create two identical datagrids, but bind the featured products to the first and the remaining products to the second. If you create a user control from t...two db table column, one datagrid column
I have a db table which have two column, first name and last name.
Can I show them in one datagrid column?
Yes you may. Through the usage of the TemplateColumn, yes. An example of this:
<asp:DataGrid runat="server" ID="dgSomeGrid">
"LastName") %&g...How to display column total of numeric columns in the datagrid footer
I able to connect Datagrid control to ADO.Net for pulling data. But I can not able to display total of a numeric field column in the Datagrid footer. Is it possible? How? Please tell me any one.
Hi, please read up Displaying Column Summary Information in the Footer and HOW TO: Create a Summary Row for a DataGrid in ASP.NETHope this helps..Alvin ChooiMicrosoft ASP.NET™ Enthusiast v1.1 / v2.0, Malaysia Blog : http://alvinzc.blogspot.com...When is a column not a column?
I have several extremely similar datawindows that I have to maintain that go
against the same table. Recently, I had to add a column to that table, and
also add the column to ALL of these datawindows that go against this table.
I added the column to the first datawindow, set up the edit control style,
etc. I then did a copy/paste of the columns edit control to the remaining
dw's (of course remembering to first add the column in SQL). Everything
(update props, column specs, column props) seems to indicate that the pasted
column is linked to the column I selected, HOWEVER, when I...How to retrieve controls in column header of a DataGrid?
I have controls in column header of a my DataGrid control grdDocumentDate. I use grdDocumentDate.FindControl() to look for the controls in column header but could not get them. Is there any way to solve the problem?
ImageButton ib = (ImageButton)grdDocumentDate.FindControl("ibDocDate");ib always returns null.<asp:datagrid id="grdDocumentDate" style="Z-INDEX: 118; LEFT: 24px; POSITION: absolute; TOP: 176px" runat="server" BorderWidth="0px" AllowSorting="True" AutoGenerateColumns="False" OnItemCommand="ShowMoreDetailsCommand" BackColor="Silver" Width="704px"> ...Displaying image in a column of a datagrid control
How can i display an image in a column of a datagrid control? On clicking that image i want to redirect to another screen based on the row selected.
Also how should i open an popup screen by clicking the hyperlink column of a datagrid control.
It is similar to a message board forum.(viewing all the messages posted with details)
Thanks in advance.
you can take a look at this article. There are many others around when you google for it.
Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons....Setting Datagrid Column to invisible when Column is an AutoGeneratedColumn NOT a bound Column
Just like the title says, I'm trying to set a column to invisible but I'm unable to do so.
If I bound the column I can used the code:
me.datagrid.Column.Item(1).Visible = False
But since I'm wanting the column NOT to be bound (there are a number of sql scripts that populate the same datagrid so I cannot bound all the columns since the columns are different for each script etc etc etc) how do I set an AutoGeneratedColumn to invisible??