Click here to Skip to main content
14,661,175 members
Rate this:
Please Sign up or sign in to vote.
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100