15,900,461 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 Javascript questions
View Visual Basic 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 Julia Fraveau (Top 23 by date)
Julia Fraveau
4-Jun-15 11:56am
View
You are the man @OginalGiff..
Julia Fraveau
4-Jun-15 11:29am
View
Just tried your solution,but is the same like mine @PIEBALDConsult.
Julia Fraveau
4-Jun-15 11:27am
View
Ok PIEBALDconsult right away sir.
Julia Fraveau
4-Jun-15 11:26am
View
Thanks @OriginalGiff, you mean in the place of the IndexOf?
Julia Fraveau
7-May-15 15:56pm
View
I am trying to figure out something similar to this ,hopes solutions come out Ekona_Pikin,But Just another thought why dont you try to add another Foreach loop that would be used to access your objects like==> "GOOD", "BAD TOO HIGH" etc....just a thought.
Julia Fraveau
4-Apr-15 11:19am
View
Yay!!! works thanks I guess I will say thanksboth @George Jonsson and Ekona_Pikin works perfect actually I used the of "MM/dd/yy HH:mm" since my date field in my DB was in a military Time format so works great:))))
Julia Fraveau
4-Apr-15 11:05am
View
Hey Ekona_Pikin on your method to select did you put the code in a button_click or where?
Julia Fraveau
4-Apr-15 11:00am
View
Thanks @Ekona_Pikin let me get on it.
Julia Fraveau
3-Apr-15 11:29am
View
Thanks Sudevsu, am only working on fixing a solution that has been there I did not designed such DB ,just so you know, but thanks again for your time
Julia Fraveau
3-Apr-15 11:27am
View
May the reason is because I am pulling from an access DB and the way dates field was designed is in MM:dd:yyyy:mm:ss is that an isue?
Julia Fraveau
3-Apr-15 11:19am
View
Thanks for your time Sudevsu, i GET "The Expression contains an invalid string constant
Julia Fraveau
3-Apr-15 10:42am
View
ok thanks
Julia Fraveau
3-Apr-15 10:26am
View
@Sudevsu, I have done that this my method private void dateTimePicker1_ValueChanged(object sender, Event Args e){Dataview view=new Dataview;dataGridView1.DataSource=view;view.RowFilter=("EndTime=#{0}#,datTimePicker1.Value.TolongDateString()); thats what I have ,but errors erros
Julia Fraveau
3-Apr-15 5:34am
View
Hi@ murkalkiran please how can i implement that?
Julia Fraveau
2-Apr-15 19:46pm
View
Deleted
Thanks Sudevsu, yes is from toolbox in a windows Application Form
private void textBox1_TextChanged(object sender, EventArgs e)
{
//DataView dv = new DataView(dto);
//dv.RowFilter = string.Format("SELECT StartTime From Computers WHERE StartTime LIKE #>01/01/2015 #" +textBox1.Text);
//dataGridView2.DataSource = dv;
///// create an open the connection
OleDbConnection conn = new OleDbConnection(conString);
OleDbCommand command = new OleDbCommand();
command = conn.CreateCommand();
// create the DataSet
DataSet ds = new DataSet();
DataView view = new DataView();
System.Data.DataTable dto = new System.Data.DataTable();
view.RowFilter = string.Format("EndTime Like '#{0}#'", textBox1.Text);
OleDbDataAdapter adapter = new OleDbDataAdapter();
adapter = new OleDbDataAdapter(command);
//adapter.Fill(ds);
dataGridView2.DataSource = ds;}
Julia Fraveau
24-Mar-15 12:14pm
View
hey thanks , Richard, I finally got a way around it by using expression,thanks for all your help:))
Julia Fraveau
24-Mar-15 8:56am
View
now I actually did a public int theRowIndex{get;set},public int theRowIndex{get;set} errors went away ,but when I hit the button nothing happens I pull all these together with ur method on a buttonclick
Julia Fraveau
24-Mar-15 8:36am
View
Exactly, I did that ,but the erros dont wanna go away.
Julia Fraveau
24-Mar-15 8:22am
View
the use of unassigned variables ==>ColumnIndex, RowIndex
Julia Fraveau
24-Mar-15 7:51am
View
Thanks again for your time and guide Richard, I have done like this var args = new DataGridViewCellEventArgs(ColumnIndex, RowIndex);
dataGridView2_CellContentClick(dataGridView2, args);ColumnIndex and RowIndex are the two indices here but am still getting errorrs, and when ever I hover around DataGridViewCellEventArgs I see (int columnIndex, int rowIndex)I have no idea why still ,getting errors
Julia Fraveau
23-Mar-15 12:59pm
View
Hi @Joan , the calculations are working ,but every time I would have to click eache cell say if there are 1000 rows ,is alot sir Joan, is there a way I could use gridview method performed above in my code in button_Click();pointed above by @Richard Deeming that I should use => var args = new DataGridViewCellEventArgs(theColumnIndex, theRowIndex);
dataGridView2_CellContentClick(dataGridView2, args);
I'm getting errors about the parameters .
Julia Fraveau
23-Mar-15 12:12pm
View
Thanks Richard, I have copied ur code, var args = new DataGridViewCellEventArgs(theColumnIndex, theRowIndex);
dataGridView2_CellContentClick(dataGridView2, args);
but I get its yelling at me about the parameters do I need to declare those theColumnIndex and theRowIndex first?
Julia Fraveau
23-Mar-15 11:51am
View
Deleted
Hi thxnks Joan, this my complete method ,I don't just know how to call it on a button instead of clicking every cell
private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 5 || e.ColumnIndex == 6)
{
object val1 = dataGridView2.Rows[e.RowIndex].Cells[5].Value;
object val2 = dataGridView2.Rows[e.RowIndex].Cells[6].Value;
Tolerance =TargetWeight * 0.05;
if (val1 != null && val2 != null
&& double.TryParse(val1.ToString(), out ActualWeight)
&& double.TryParse(val2.ToString(), out TargetWeight))
{
dataGridView2.Rows[e.RowIndex].Cells[0].Value
=Math.Round (ActualWeight-TargetWeight);
dataGridView2.Rows[e.RowIndex].Cells[1].Value
= Math.Round(TargetWeight * 0.05);
}
else
{
dataGridView2.Rows[e.RowIndex].Cells[0].Value
= "Invalid Numbers";
}
if (Tolerance >= 5) { dataGridView2.Rows[e.RowIndex].Cells[2].Value = "GreenFlags"; }
if (Tolerance < 5) { dataGridView2.Rows[e.RowIndex].Cells[2].Value = "YellowFlags"; }
if (Tolerance < 4 ) { dataGridView2.Rows[e.RowIndex].Cells[2].Value = "PurpleFlags"; }
if (Tolerance <=3 ) { dataGridView2.Rows[e.RowIndex].Cells[2].Value = "REDFlags"; }
}
}
Show More