15,922,630 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
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.