GridControl のボタン (検索とクリーン) をなくして、一人で TextEdit を離れることができるように。
よろしくアレックス
はい、可能です。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;
検索パネルのレイアウトをカスタマイズする方法で説明されているアプローチを使用できます。例:
GridView.CreateFindPanel
、独自のカスタマイズさFindControl
れたインスタンスをビューに提供します。