Hi Dimitar,
Now I am getting value of my typed text..
I wanna search name in my db by using that typed text and bind in same column(GridViewComboBoxColumn)
I am trying like this
private void TextBoxItem_KeyDown(object sender, KeyEventArgs e)
{
var textBoxItem = sender as RadTextBoxItem;
var text = textBoxItem.Text;
Datatable dt = new DataTable();
string sql = "select firstname from Namemaster where firstname like '%" + text + "%' or lastname like '%" + text + "%' or middlename like '%" + text + "%'";
dt = objdl.getDataTable(sql);
GridViewComboBoxColumn comboboxcolumn = (radGV.Columns["Combo"] as GridViewComboBoxColumn);
comboboxcolumn.DataSource = dt;
}
public DataTable getDataTable(string str)
{
con.Open();
sqlcom = new SqlCommand(str, con);
sqlcom.CommandTimeout = 300;
dr = sqlcom.ExecuteReader();
dt = new DataTable();
dt.Load(dr);
con.Close();
}
But it will not working properly
I want to display firstname only in my GridViewComboBoxColumn if i searching with lastname and middlename.
while searching with firstname everything is fine, i need the same result for lastname and middlename.