0

我有一个表单,其中有两个组合框和一个网格,我已经在组合框的 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;
            }
4

1 回答 1

0
on the grid tag

<Grid>

try the following code

    <ClientSettings AllowKeyboardNavigation="true" 
                KeyboardNavigationSettings-AllowSubmitOnEnter="true"
                KeyboardNavigationSettings-AllowActiveRowCycle="true" 
                KeyboardNavigationSettings-CollapseDetailTableKey="LeftArrow"
                KeyboardNavigationSettings-ExpandDetailTableKey="RightArrow">

            </ClientSettings>




</Grid>

这将确保您在网格中启用键盘导航

于 2012-10-01T13:43:15.047 回答