LINQ in Action roller

Change row color after datagridview binding using LINQ

The code below works, but it changes all rows to RED Forecolor. I guess I need a row index or something to tell it which row to change forecolor. This might not be the most efficent way to do this using LINQ ToList(). Anyone got some ideas or examples on how to change row color with a condition? Thanks for your help. var db = new dispatchDataContext (); var q = db.SP_DispatchHistoryLog(dispatch, casenum, streetname, officer); dataGridView1.DataSource = q.ToList(); foreach ( DataGridViewRow dr in Read More...
Published Tuesday, April 29, 2008 12:03 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication