Click here to Skip to main content
15,891,905 members
Home / Discussions / C#
   

C#

 
AnswerRe: Connection to MySQL Pin
User 66589-Jul-08 20:24
User 66589-Jul-08 20:24 
GeneralRe: Connection to MySQL Pin
D i x y9-Jul-08 20:34
D i x y9-Jul-08 20:34 
GeneralRe: Connection to MySQL Pin
User 66589-Jul-08 20:45
User 66589-Jul-08 20:45 
AnswerRe: Connection to MySQL Pin
sacr839-Jul-08 22:58
sacr839-Jul-08 22:58 
QuestionHow to rename a file? Pin
Saiyed Alam9-Jul-08 19:31
Saiyed Alam9-Jul-08 19:31 
AnswerRe: How to rename a file? Pin
User 66589-Jul-08 20:20
User 66589-Jul-08 20:20 
Questionbindingsource.filter syntax question Pin
crash8939-Jul-08 18:39
crash8939-Jul-08 18:39 
Questiontimer does not work Pin
benjamin yap9-Jul-08 18:13
benjamin yap9-Jul-08 18:13 
hi, i have a timer which call this method CalPrice().

The calprice will check the dategridview first column if the checkbox ==true, then calculate the price base on the the other column

private void CalPrice()
       {
           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)
               {
               }
           }
       private void timer1_Tick(object sender, EventArgs e)
       {
           CalPrice();
       }
       }



I have set the timer to enable and interval to 1000(1 second). But when i load the form, the timer dont seems to start. It does not call the calPrice method
AnswerRe: timer does not work Pin
mav.northwind9-Jul-08 19:09
mav.northwind9-Jul-08 19:09 
GeneralRe: timer does not work Pin
benjamin yap9-Jul-08 19:34
benjamin yap9-Jul-08 19:34 
GeneralRe: timer does not work Pin
Seishin#9-Jul-08 21:58
Seishin#9-Jul-08 21:58 
QuestionTHE PRINTER Pin
Silvyster9-Jul-08 17:53
Silvyster9-Jul-08 17:53 
AnswerRe: THE PRINTER Pin
Ajay.k_Singh9-Jul-08 22:33
Ajay.k_Singh9-Jul-08 22:33 
GeneralRe: THE PRINTER Pin
Silvyster10-Jul-08 1:59
Silvyster10-Jul-08 1:59 
Questionclose form Pin
nelsonpaixao9-Jul-08 14:18
nelsonpaixao9-Jul-08 14:18 
AnswerRe: close form Pin
Christian Graus9-Jul-08 15:21
protectorChristian Graus9-Jul-08 15:21 
AnswerRe: close form Pin
Nirandas9-Jul-08 22:59
Nirandas9-Jul-08 22:59 
Questioncancel button [X] Pin
nelsonpaixao9-Jul-08 14:07
nelsonpaixao9-Jul-08 14:07 
AnswerRe: cancel button [X] Pin
PIEBALDconsult9-Jul-08 14:58
mvePIEBALDconsult9-Jul-08 14:58 
Generalcancel button [X] Pin
nelsonpaixao9-Jul-08 15:14
nelsonpaixao9-Jul-08 15:14 
GeneralRe: cancel button [X] Pin
Luc Pattyn9-Jul-08 15:21
sitebuilderLuc Pattyn9-Jul-08 15:21 
GeneralRe: cancel button [X] Pin
PIEBALDconsult10-Jul-08 4:19
mvePIEBALDconsult10-Jul-08 4:19 
GeneralRe: cancel button [X] Pin
PIEBALDconsult10-Jul-08 12:40
mvePIEBALDconsult10-Jul-08 12:40 
Questiontitle bar Pin
nelsonpaixao9-Jul-08 14:01
nelsonpaixao9-Jul-08 14:01 
AnswerRe: title bar Pin
Luc Pattyn9-Jul-08 15:23
sitebuilderLuc Pattyn9-Jul-08 15:23 

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.