I have a WinForms Application that reads in some data from tables in Access using a query and prints it out to a datagridview. I was just wondering if there was any possible way I could indent or highlight a row with a matching "SN". There should be two matching "SN's" but I would only like to indent or highlight one of them. Here's what I have if it's any help...
ad.SelectCommand = new OleDbCommand("SELECT b.RSV_CAT, b.SEQNUM, b.LEASE, b.WELL_ID, a.QUALIFIER, a.KEYWORD, a.EXPRESSION FROM [AC_ECONOMIC] a INNER JOIN [AC_PROPERTY] b on a.PROPNUM=b.PROPNUM WHERE a.KEYWORD = '" + end + "' AND a.QUALIFIER = '" +qual+ "' AND a.EXPRESSION LIKE 'SN%'", con);
ad3.SelectCommand = new OleDbCommand("SELECT b.RSV_CAT, b.SEQNUM, b.LEASE, b.WELL_ID, a.QUALIFIER, a.KEYWORD, a.EXPRESSION FROM [AC_ECONOMIC] a INNER JOIN [AC_PROPERTY] b on a.PROPNUM=b.PROPNUM WHERE a.KEYWORD = '" + start + "' AND a.QUALIFIER = '" + qual + "' AND a.EXPRESSION LIKE 'SN%'", con3);
I'd like to indent or highlight the query with the start
variable in it or the ad3.Selectcommand
. Any help would be much appreciated.
Also here's some of the dataGridView
code I have that gets rid of the borders...
private void newWindow_Load(object sender, EventArgs e)
{
this.dataGridView3.AdvancedCellBorderStyle.Left = DataGridViewAdvancedCellBorderStyle.None;
this.dataGridView3.AdvancedCellBorderStyle.Right = DataGridViewAdvancedCellBorderStyle.None;
this.dataGridView3.AdvancedCellBorderStyle.Bottom = DataGridViewAdvancedCellBorderStyle.None;
this.dataGridView3.AdvancedCellBorderStyle.Top = DataGridViewAdvancedCellBorderStyle.None;
dataGridView3.DataSource = ((Form1)frm1).ds.Tables[0];
}