Click here to Skip to main content
15,922,630 members

Comments by Manoj Kumar Mandal (Top 2 by date)

Manoj Kumar Mandal 28-Apr-15 8:32am View    
Deleted
In that case just set the DataPropertyName for the checkbox to the value containing 1 or 0. It will automatically set to selected if value is 1 and unselected if 0
Manoj Kumar Mandal 28-Apr-15 7:43am View    
I havent checked with wild characters but you can try with this code
for (int i = 0; i < dt.Rows.Count; i++)
{
int RowIndex = dt1.Rows.Count - 1;
string resource ="";

resource = RowIndex >= 0 ? dt1.Rows[RowIndex]["Resource"].ToString() : dt.Rows[0]["Resource"].ToString();
if (dt.Rows[i]["Resource"].Equals(resource + "Delay"))
{

double SumValue = Convert.ToDouble(dt1.Rows[RowIndex]["TimeInteral"]) + Convert.ToDouble(dt.Rows[i]["TimeInteral"]);
dt1.Rows[RowIndex]["TimeInteral"] = SumValue.ToString();
}
else
{
dr1 = dt1.NewRow();
dr1["Runtime"] = dt.Rows[i]["Runtime"];
dr1["TimeInteral"] = dt.Rows[i]["TimeInteral"];
dr1["value1"] = dt.Rows[i]["value1"];
dr1["value2"] = dt.Rows[i]["value2"];
dr1["value3"] = dt.Rows[i]["value3"];
dr1["iteration"] = dt.Rows[i]["iteration"];
dr1["Mode"] = dt.Rows[i]["Mode"];
dr1["Resource"] = dt.Rows[i]["Resource"];
dt1.Rows.Add(dr1);
}

}
because as i can see from your data that delay occurs with the same name of previous resource.