|
-
Feb 27th, 2014, 06:32 AM
#1
Thread Starter
Junior Member
Arithmetic In Datagridview Rows
Brief : I need to add Column1 + Column2 And Display Result In Column3
But I need to do it for all rows in column3 automatically. I need a very short code.
Thankyou.
-
Feb 27th, 2014, 09:22 AM
#2
Re: Arithmetic In Datagridview Rows
How are column1 and column2 going to be populated? Will the user be entering these values or will you be loading them from a database?
 I always add to the reputation of those whose posts are helpful, and even occasionally to those whose posts aren't helpful but who obviously put forth a valiant effort. That is, when the system will allow it.
My war with a browser-redirect trojan
-
Feb 27th, 2014, 09:23 AM
#3
Re: Arithmetic In Datagridview Rows
assuming you are using a data bound table to populate the grid, create a new column in the data table and set its expression property to "Column1 + Column2". Here is a link to the expression property documentation. http://msdn.microsoft.com/en-us/libr...v=vs.110).aspx
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
-
Feb 28th, 2014, 12:09 AM
#4
Thread Starter
Junior Member
Re: Arithmetic In Datagridview Rows
I will load data from a csv file.
-
Feb 28th, 2014, 12:40 AM
#5
Re: Arithmetic In Datagridview Rows
 Originally Posted by Thasarath
I will load data from a csv file.
Then load the contents of the CSV file into a DataTable and then do as kebo suggested.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|