0

GridControl のボタン (検索とクリーン) をなくして、一人で TextEdit を離れることができるように。

ここに画像の説明を入力 よろしくアレックス

4

2 に答える 2

0

はい、可能です。FindControl にアクセスしてから、layoutControl とそのコントロール項目にアクセスする必要があります。以下のコードを form_load などで使用します。

         // Get the Find Control on Grid : gcMain
        FindControl _FindControl = gcMain.Controls.Find("FindControl", true)[0] as FindControl;

           //Get the Layout Control
        LayoutControl lc = (_FindControl.ClearButton.Parent as LayoutControl);

        //Allow Control Hiding 
        lc.Root.AllowHide = true;

        //Hide Find Button
        (lc.Root.Items[2] as LayoutControlItem).ContentVisible = false;


        //Hide Clear Button
        (lc.Root.Items[3] as LayoutControlItem).ContentVisible = false;
于 2016-08-25T11:27:47.433 に答える
0

検索パネルのレイアウトをカスタマイズする方法で説明されているアプローチを使用できます。例:

  1. GridControl/GridView の子孫コンポーネントを作成する
  2. メソッドをオーバーライドしてGridView.CreateFindPanel、独自のカスタマイズさFindControlれたインスタンスをビューに提供します。
于 2013-04-15T08:33:43.990 に答える