我有一个表单,其中有两个组合框和一个网格,我已经在组合框的 selectedindex 更改事件上编写了过滤代码,为组合框设置了 SuggestAppend 属性。当我输入一个国家/地区名称,例如印度并按 Enter 选择索引更改事件不会立即触发,当我单击某个地方时,它会触发并提供输出。请建议我该怎么做。在此先感谢
protected void cbCountry_SelectedIndexChanged(object sender, EventArgs e)
{
GetCondition();
Fillgrid();
}
public string GetCondition()
{
string Condition = "";
if (cbEmployee.SelectedIndex > 0)
{
Condition = Condition + " And reg_no=" + cbEmployee.SelectedValue;
}
if (cbCountry.SelectedIndex > 0)
{
Condition = Condition + " And country='" + cbCountry.SelectedItem.Text + "'";
}
return Condition;
}