Click here to Skip to main content
14,876,154 members
Home / Discussions / C#
   

C#

 
GeneralRe: cancel button [X] Pin
PIEBALDconsult10-Jul-08 12:40
professionalPIEBALDconsult10-Jul-08 12:40 
Questiontitle bar Pin
nelsonpaixao9-Jul-08 14:01
Membernelsonpaixao9-Jul-08 14:01 
AnswerRe: title bar Pin
Luc Pattyn9-Jul-08 15:23
sitebuilderLuc Pattyn9-Jul-08 15:23 
AnswerRe: title bar Pin
Christian Graus9-Jul-08 15:25
protectorChristian Graus9-Jul-08 15:25 
AnswerRe: title bar Pin
Thomas Stockwell10-Jul-08 5:03
professionalThomas Stockwell10-Jul-08 5:03 
QuestionControl doesn't get update Pin
verkniss9-Jul-08 9:45
Memberverkniss9-Jul-08 9:45 
AnswerRe: Control doesn't get update Pin
verkniss10-Jul-08 4:28
Memberverkniss10-Jul-08 4:28 
Questioncalculate totalprice base on checkbox Pin
benjamin yap9-Jul-08 9:00
Memberbenjamin yap9-Jul-08 9:00 
Hi, i got this code to calculate the price when i tick the checkbox in my datagridview

double price = 0.0;
foreach (DataGridViewRow dgw in dataGridProduct.Rows)
{
    DataGridViewCheckBoxCell datacell = dgw.Cells[0] as DataGridViewCheckBoxCell;

    try
    {
        if ((bool)datacell.Value == true)
        {
            //MessageBox.Show("" + dgw.ToString());

            price += Convert.ToDouble(dgw.Cells[6].Value.ToString());
            lblTotalPrice.Text = "Total Price : $ " + price;
        }
    }
    catch (Exception exc)
    {
    }
}


When i tick the box, the price should add up, and when i untick the price will be minus.

I believe abit of my logic is wrong, can you help me with it?
AnswerRe: calculate totalprice base on checkbox Pin
KaptinKrunch9-Jul-08 10:12
MemberKaptinKrunch9-Jul-08 10:12 
AnswerRe: calculate totalprice base on checkbox Pin
Wes Aday9-Jul-08 10:15
professionalWes Aday9-Jul-08 10:15 
AnswerRe: calculate totalprice base on checkbox Pin
Paul Conrad9-Jul-08 13:24
professionalPaul Conrad9-Jul-08 13:24 
QuestionHow do change the properties of tool in Form1 from other Form2? Pin
zeeShan anSari9-Jul-08 8:44
MemberzeeShan anSari9-Jul-08 8:44 
AnswerRe: How do change the properties of tool in Form1 from other Form2? Pin
Christian Graus9-Jul-08 8:49
protectorChristian Graus9-Jul-08 8:49 
AnswerRe: How do change the properties of tool in Form1 from other Form2? Pin
TheFM2349-Jul-08 10:37
MemberTheFM2349-Jul-08 10:37 
AnswerRe: How do change the properties of tool in Form1 from other Form2? Pin
nelsonpaixao9-Jul-08 15:32
Membernelsonpaixao9-Jul-08 15:32 
Questionhashtable Pin
benjamin yap9-Jul-08 8:40
Memberbenjamin yap9-Jul-08 8:40 
AnswerRe: hashtable Pin
Christian Graus9-Jul-08 8:43
protectorChristian Graus9-Jul-08 8:43 
AnswerRe: hashtable Pin
snorkie9-Jul-08 9:00
professionalsnorkie9-Jul-08 9:00 
QuestionSelect particular types tool and then change their properties at a time,How? Pin
zeeShan anSari9-Jul-08 8:34
MemberzeeShan anSari9-Jul-08 8:34 
AnswerRe: Select particular types tool and then change their properties at a time,How? Pin
Christian Graus9-Jul-08 8:39
protectorChristian Graus9-Jul-08 8:39 
QuestionRe: Select particular types tool and then change their properties at a time,How? Pin
zeeShan anSari9-Jul-08 8:56
MemberzeeShan anSari9-Jul-08 8:56 
AnswerRe: Select particular types tool and then change their properties at a time,How? Pin
hammerstein059-Jul-08 9:00
Memberhammerstein059-Jul-08 9:00 
QuestionRe: Select particular types tool and then change their properties at a time,How? Pin
zeeShan anSari9-Jul-08 9:08
MemberzeeShan anSari9-Jul-08 9:08 
AnswerRe: Select particular types tool and then change their properties at a time,How? Pin
hammerstein059-Jul-08 9:12
Memberhammerstein059-Jul-08 9:12 
GeneralRe: Select particular types tool and then change their properties at a time,How? Pin
zeeShan anSari9-Jul-08 9:19
MemberzeeShan anSari9-Jul-08 9:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.