Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/441.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 组合框所选索引事件未在一次单击中给出输出_Javascript_Ajax - Fatal编程技术网

Javascript 组合框所选索引事件未在一次单击中给出输出

Javascript 组合框所选索引事件未在一次单击中给出输出,javascript,ajax,Javascript,Ajax,我有一个表单,其中有两个组合框和一个网格, 我已经在组合框的selectedindex changed事件上编写了过滤代码,为组合框设置了SuggestAppend属性。当我键入国家名称(如印度)并按enter键时,选定的索引更改事件不会立即触发,当我单击某个位置时,它会触发并给出输出。 请建议我做什么。提前谢谢 protected void cbCountry_SelectedIndexChanged(object sender, EventArgs e) {

我有一个表单,其中有两个组合框和一个网格, 我已经在组合框的selectedindex changed事件上编写了过滤代码,为组合框设置了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;
            }
网格标记上的

请尝试以下代码

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

我使用的是telerik radgrid,telerik中不支持大多数这些属性实际上客户端设置属性是针对telerik的。
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>