may i know how to highlight or sort in datagridview if the comparison is less than 100?
i need to sort out the gridview and highlight those values that is lesser than 100
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Dhaval PatelRank #1,023 · 1.9K reputationPosted Jan 18, 2012, 7:01 PM EST
Dear Wong you are usig this for highlight your datagridview dataset ds=new dataset(); int intCount; intCount = ds.Tables["myTable"].Rows.Count; for(int i = 0; i intCount; i++) { if(ds.Tables[0].rows[0]["columnname"] { GlowDataGrid.Rows[i].DefaultCellStyle.BackColor = Color.White; } } Thanks & Regards Dhaval patel This post help you then please Mark as Accepted AnswerWong Jun15 reputationPosted Jan 29, 2012, 10:16 PM EST
Wong Jun15 reputationPosted Jan 29, 2012, 10:36 PM EST
Dhaval PatelRank #1,023 · 1.9K reputationPosted Jan 30, 2012, 3:16 AM EST
Dear Wong please make changes in if condition than your problem is solve. if(ds.Tables[0].rows[0]["columnname"]"100" ) { GlowDataGrid.Rows[i].DefaultCellStyle.BackColor = Color.White; }Thanks & Regards
Dhaval Patel
Wong Jun15 reputationPosted Jan 30, 2012, 3:47 AM EST