Click here to Skip to main content
15,897,122 members

Comments by Javad Emsakpour (Top 2 by date)

Javad Emsakpour 28-Dec-13 3:23am View    
my source database version is 2008r2.
even when my source database version is 2008r2, and i attach to 2008 ,i get error.
Javad Emsakpour 2-Dec-13 4:26am View    
for winforms
like this...
private int lastIndex;
private char lastKey;

private void dataGridView1_KeyPress(object sender, KeyPressEventArgs e)
{
if (Char.IsLetter(e.KeyChar))
{
for (int i = 0; i < (dataGridView1.Rows.Count); i++)
{
if (dataGridView1.Rows[i].Cells[0].Value.ToString().StartsWith(e.KeyChar.ToString(), true, CultureInfo.InvariantCulture))
{
if (lastKey == e.KeyChar && lastIndex < i)
{
continue;
}

lastKey = e.KeyChar;
lastIndex = i;
dataGridView1.Rows[i].Cells[0].Selected = true;
return;
}
}
}
}