0

2 つのコンボ ボックスと 1 つのグリッドがあるフォームを使用しています。コンボ ボックスの selectedindex 変更イベントにフィルタリング コードを記述しました。コンボ ボックスに SuggestAppend プロパティが設定されています。インデックス変更イベントはすぐには発生しません。どこかをクリックすると、そのイベントが発生して出力が得られます。何をすべきか提案してください。事前に感謝します

  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 に答える