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 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> <...Addition of two Columns in third Column.
I got stucked in my project and i need your help.
I have a data grid with data from sql 2005. I have got two amount columns - Amount1 & Amount2 with values from database. I want the addition of both in Total column (type: template) which I added in data grid view I also want the grand total of Total column in the bottom.
>I have got two amount columns - Amount1 & Amount2 with values from databaseWhy not change the select? ChangeSELECT Amount1, Amount2 FROM FREDto SELECT Amount1, Amount2, (Amount1 + Amount2) AS Amount3 FROM FRED...Compare Two columns and update the Third Column
Hi,I have three columns and want to update the third column based on the comparison of first two columns in the same table.For instance:Col1 - val1, val2, val3, val4, val5......Col2 - NULL, NULL, val1, NULL, val2....Col3 - TRUE, TRUE, FALSE, FALSE, FALSE....Thanks for any help.
When you define a column, you can define it as a "computed column".
Make col3 a computed column and fill in the comparison expression.
Dear David,Thanks for your reply. Actually I have table with more then 7000 records in it. and all the columns are already defined. I was lookin...how do i get the column i want if result has two columns with the same name?
let's say my select command returns two columns with the same name "Id".(those two columns are from different tables) so would it be possible to get the data from the second column if i don't use the index? thanks in advance
Try to use alias:
SELECT table1.id as id1, table2.id as id2, othercolumn from......Limno...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 = ...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 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...Grouping two columns into one column with GridView
I would like to modify the default output of a gridview to group two columns into one column. This is probably best explained by example. So, lets say there is a simple gridview with the output something like this:Name Description Date------------------------------------------------------------------Foo Some description of foo &nb...Combine Two Different Columns into one column
I have twotables(Employee and Borrower). In Employee table have EMPID and Borrower table have BorrowerID. I want to comebine these two columns into one column as EMPID in Employee table. Can any one help?
what is realtion between to tables ?
Thanks for reply.
Acutally Employee table EMPID, NAME Columns. in this Employee table had 12000 rows. Borrower table has BorrowerID,BType etc.. .Here Employee ID and BorrowerID both are same. This table has 16000 rows. Now my what i want to do is Come EMPID and BorrowerID and ...3 column design insetad of two column
I would like to have 3 column design for csk, similar to www.buysellcommunity.com. How can I achieve this? What changes do I need to make to the CSS? Does anybody has sample code?Rafal Zikbay.com - Free Classifieds (Search Over 5 mln jobs on Zikbay.com) DNN Direct
I don't know what you are using currently, but this article describes how to design a website with Pure CSS (and the last example is a 3 colum design): http://www.singingeels.com/Articles/How_To_Pure_CSS_Design.aspx-Timothy Khourihttp://www.SingingEels.com/Developer / Architect / Author
There are some really good CSS templ...Is it possible to limit the items in a dataList control to two columns and two rows?
or with sql?
to have less columns select less field to have less row use the top function.
I really suggest you do not use * to get all fields its longer and normally you do not need all tables fieldDo not forget to mark as answer all message who help you.Don't forget to check if you can answer some of our question to.
sorted thanks...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...two column repeater control?
I want to display my data in a two column repeater control. Art some point it may go to three columns. My control looks like this: <asp:Repeater ID="Repeater1" runat="server"> <HeaderTemplate> <table class="p_innerTable"> </HeaderTemplate>  ...