15,899,026 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 ns_27 (Top 14 by date)
ns_27
3-Sep-12 3:25am
View
Thanks For Answer... :)
ns_27
24-Aug-12 2:15am
View
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
txtmop.Text=(int.Parse(txtdp.Text.ToString()))-(int.Parse(txtdp.Text.ToString())*((int.Parse(comboBox1.SelectedValue.ToString()))/100)).ToString();
}
Still getting same error !!!
ns_27
23-Aug-12 8:18am
View
Thank you so much for your code. !!!
ns_27
23-Aug-12 8:16am
View
I wrote this code...
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
txtmop.Text.ToString()=(int.Parse(txtdp.Text.ToString()))-(int.Parse(txtdp.Text.ToString())*((int.Parse(comboBox1.SelectedValue.ToString()))/100)).ToString();
}
Error 1 Operator '-' cannot be applied to operands of type 'int'
This error i am getting.. plz help me to resolve it. Thanks !!
ns_27
23-Aug-12 8:03am
View
Deleted
I have wrote below code...
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
ToString().txtmop.Text=(int.Parse(txtdp.Text)-(int.Parse(txtdp.Text)*((int.Parse(comboBox1.SelectedValue.ToString())))/100)).ToString();
}
still getting error. plz help
ns_27
20-Aug-12 7:35am
View
Showing below two errors:
Error 1: The best overloaded method match for 'int.Parse(string)' has some invalid arguments
Error 2: Argument '1': cannot convert from 'object' to 'string'
ns_27
20-Aug-12 5:12am
View
Nothing is happing no calculation..
I have i text box in which i enter 10000
then i selected % from combo box1 10
i want ans 9000 in my text box2
ns_27
20-Aug-12 5:03am
View
Thanks for help but its not working??
plz help me.
ns_27
20-Aug-12 5:02am
View
No calculation has done...
i want like below..
text box1 - 10% = text box2
ns_27
23-Jun-12 6:34am
View
Thanks again...... I tried "else" earlier with that code but in that i missed out brackets.. so...
Thanks :)
ns_27
18-Jun-12 3:04am
View
Hey can you please help me with one more Question??
In my data grid view previously selected rows remains selected until i go to other page and come on that page again.
I want it like when i search for "Apple" it will get selected and again if i go to com box and search for other word so that previously selected rows get unselected.
ns_27
16-Jun-12 4:07am
View
Thank you so much for your help ......
Its working fine
:):D
ns_27
16-Jun-12 3:09am
View
I have Try this previous code too...
still getting same exception and Error like - "the name 'j' and 'i' does not exist in current contex"
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if(dataGridView1[i, j].Value!= null)
{
for (int i = 0; i < dataGridView1.Columns.Count; i++)
{
for (int j = 0; j < dataGridView1.Rows.Count; j++)
{
if (dataGridView1[i, j].Value.ToString() == comboBox1.Text)
{
dataGridView1[i, j].Style.BackColor = Color.Blue;
dataGridView1.Rows[j].DefaultCellStyle.BackColor = Color.Red;
}
}
}
}
}
ns_27
15-Jun-12 2:41am
View
Thanks for your help... !!!
I have code this,
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
for (int i = 0; i < dataGridView1.Columns.Count; i++)
{
for (int j = 0; j < dataGridView1.Rows.Count; j++)
{
if (dataGridView1[i, j].Value.ToString() == comboBox1.Text)
{
dataGridView1[i, j].Style.BackColor = Color.Blue;
dataGridView1.Rows[j].DefaultCellStyle.BackColor = Color.Red;
}
}
}
}
But I am getting Exception as below,,
if (dataGridView1 [i, j].Value.ToString()==comboBox1.Text)----> Nullrefrenceexception was unhadle
How to solve this??
Show More