Click here to Skip to main content
16,016,760 members

Comments by Member 12466358 (Top 5 by date)

Member 12466358 19-Apr-16 6:36am View    
Table is like that
name class1 class2 class3
ram 0 1 1
sita 1 1 0

i want to show data in below formate
name class1 class2 class3
ram bg red(0) bg green(1) bg green(1)
sita bg green(1) bg green(1) bg red(0)

Please advise me
data type of class is nubers
Member 12466358 19-Apr-16 6:35am View    
Deleted
Table is like that
name class1 class2 class3
ram 0 1 1
sita 1 1 0

but i want to show data in below form
name class1 class2 class3
ram bg red(0) bg green(1) bg green(1)
sita bg green(1) bg green(1) bg red(0)

Please advise me
data type of class is nubers
Member 12466358 19-Apr-16 6:34am View    
Deleted
Table is like that
name class1 class2 class3
ram 0 1 1
sita 1 1 0


name class1 class2 class3
ram bg red(0) bg green(1) bg green(1)
sita bg green(1) bg green(1) bg red(0)

Please advise me
data type of class is nubers
Member 12466358 19-Apr-16 5:16am View    
Hello Sir,

i am fetching data from database.
I have tried upto here-
private void button1_Click(object sender, EventArgs e)
{
try
{
con.Open();
OleDbCommand cmd = new OleDbCommand();
cmd.Connection = con;
cmd.CommandText = "select * from School";

OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);

dataGridView1.DataSource = dt;

}
catch (Exception ex)
{
MessageBox.Show("Error " + ex);
}

con.Close();
}

Please advise me how can i show then cells color is red (if value is 0) or green(if value is 1).
Member 12466358 18-Apr-16 4:32am View    
"your value" it means which value i will put here?