whizzkid said:Machan does any one have a video tutorial collection (coding in C#) for MCTS 70 536 exam?
private void btnCustomer_Click(object sender, EventArgs e)
{
frmCustomer fCus = new frmCustomer();
fCus.Show();
}

frmCustomer fCus;
private void btnCustomer_Click(object sender, EventArgs e)
{
if(fCus == null ){
fCus = new frmCustomer();
}
fCus.Show();
}
...amila325 said:oya wage karala balanna
mata sure ne man java wala nam karanne oka


Thanx 
hihihi elazzzRanhiru said:elakiri machan!!! its working![]()
thanx a lot
Object eka null da nadda kiyala baluwama hari machanThanx
![]()
....amila325 said:hihihi elazzz
math tikak search karala baluwa... eka hari![]()
....
so APIIT is over now isn't it????
chindaara said:macho
i need a biiiig helpmama c# application ekak haduwa.ekata database ekakuth connect kala.dan mata mage datagrid view eke column ekak thiyenawa amount kiyala.mata wenama dapu textbox ekakata ara amount kiyana column eke data wala total eka ganna oone.mama web eka search kalama mata vb walin karana hati awa.
mei link eka thiyenawa vdo ekak.eke thiyenne vb walin.mata oone e widiyata c# walin karanna.
LINK
int count()
{
int i=0;
int sum = 0;
for (i = 0; i < DGV1.Rows.Count; i++)
{
sum += Int32.Parse(DGV1.Rows[i].Cells["Amount"].Value.ToString());
}
return sum;
}

Ranhiru said:DGV1 is your data grid view...hope this helps![]()
int i = 0;
int Total = 0;
for (i = 0; i < costDataGridView1.Rows.Count; i++)
{
Total += Int32.Parse(costDataGridView1.Rows[i].Cells["dataGridViewTextBoxColumn11"].Value.ToString());
}
this.textBox1.Text = Total.ToString();


int i = 0;
int Total = 0;
for (i = 0; i < costDataGridView1.Rows.Count; i++)
{
if (costDataGridView1.Rows[i].Cells[2].Value != null)
Total += Int32.Parse(costDataGridView1.Rows[i].Cells[2].Value.ToString());
}
this.textBox1.Text = Total.ToString();
Using the index instead of the name
Notice that now i check whether the value is not null. If Int32.Parse giving you any errors, try the Convert Class. Use Convert.ToInt32(whatever)...
Ranhiru said:Machan the first one is a problem because the column has a NULL value in it. Does the "Amount" column contain a null value??? If the "Amount" column contains NULL values, then it should be handled separately.
And for the second problem i think Amount should work :S
If amount does not seem to work, simply use the column index
So if the Amount column is the 3rd one, then the index is 2, because in C# its zero based indexes.
Code:int i = 0; int Total = 0; for (i = 0; i < costDataGridView1.Rows.Count; i++) { if (costDataGridView1.Rows[i].Cells[2].Value != null) Total += Int32.Parse(costDataGridView1.Rows[i].Cells[2].Value.ToString()); } this.textBox1.Text = Total.ToString();
So this is perfectly all right tooUsing the index instead of the name
Notice that now i check whether the value is not null. If Int32.Parse giving you any errors, try the Convert Class. Use Convert.ToInt32(whatever)...
Hope this helps![]()

Anythin for me.... if you know VB .NET and C, you know C#Jack_Sparrow said:Machan C# wala windows applications gena karamuda?

