TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sowjanya bantupalli
NA
10
7.3k
how to change text fore color in datagrid view
Oct 17 2014 12:57 AM
public void view_load_tenthclass_marks()
{
//this code for auto resize of columns
dataGridView3.AutoResizeColumns();
dataGridView3.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
ConnectionStringSettings consettings = ConfigurationManager.ConnectionStrings["smssms"];
string connectionString = consettings.ConnectionString;
SqlConnection cn = new SqlConnection(connectionString);
SqlCommand sqlcmd = new SqlCommand();
SqlDataAdapter sda = new SqlDataAdapter();
DataTable dt = new DataTable();
cn.Open();
//pass query
sqlcmd = new SqlCommand(@"select * from tenthclass_marks ", cn);
sda = new SqlDataAdapter(sqlcmd);
//Fill the data in the SQL Data Adapter
sda.Fill(dt);
//Bind it in the DataGrid View
dataGridView3.DataSource = dt;
cn.Close();
}
through this i can get marks of all students now my requirement is if student get >35 then the text color of that student should change to another color.pls help me
thank you
Reply
Answers (
2
)
use of constructor in abstract class
data base connetion