Click here to Skip to main content
14,698,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
public void view_load_tenthclass_marks()
//this code for auto resize of columns
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();

//pass query

sqlcmd = new SqlCommand(@"select * from tenthclass_marks ", cn);
sda = new SqlDataAdapter(sqlcmd);
//Fill the data in the SQL Data Adapter
//Bind it in the DataGrid View
dataGridView3.DataSource = dt;
this is my code for retrieving marks of all students.if student get <35 then that row colour should be change to another color .how to write ????

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900