or
and for the multiple rows values
like the following example:
id quantity Bonus price total
01 25 10 123 4305
01 5 10 123 1845
i want to sum of the above two rows like this in the datagrid
id quantity Bonus price total
01 30 20 123 6150
if i take loop on it then duplicate value insert in the datagridview.
like my code
For example:
for(int i=0; i
if(datagridview.rows[i].cells[0].value==txtid.Text)
{
if(comboboxtype=="Stock")
{
//For Stock
///updation code,if value exist in the datagrid
}
else
{
//For Bonus
///updation code,if value exist in the datagrid
}
}
else
{
if(comboboxtype=="Stock")
{
//For Stock
/// ///Insertion code, if value does not exist in the datagrid
}
else
{
/// For Bonus
/// ///Insertion code, if value does not exist in the datagrid
}
}
}
plz, Anyone can help me ..............
ZAIN ULARIFEENPosted Sep 13, 2013, 10:15 AM
like my code
For example:
for(int i=0; i
if(datagridview.rows[i].cells[0].value==txtid.Text)
{
if(comboboxtype=="Stock")
{
//For Stock
///updation code,if value exist in the datagrid
}
else
{
//For Bonus
///updation code,if value exist in the datagrid
}
}
else
{
if(comboboxtype=="Stock")
{
//For Stock
/// ///Insertion code, if value does not exist in the datagrid
}
else
{
/// For Bonus
/// ///Insertion code, if value does not exist in the datagrid
}
}
}
Suthish NairPosted Sep 13, 2013, 8:50 AM