Ticket Q98690
Visible to All Users

Focus Filter by text tool bar item on showing a list view

created 17 years ago

Hi,
When I open a list view (in a new window), I would like to focus the Filter by text tool bar item (as opposed to the grid control).
How would I do that?
Thanks,
Mark

Answers approved by DevExpress Support

created 17 years ago (modified 12 years ago)

Hi Mark,
Thank you for the question.
There is no easy way at all to accomplish your task. I can only suggest you access the template and then find the required item of the BarManager to focus it:

C#
namespace WinSolution.Module.Win { public partial class ViewController1 : ViewController { public ViewController1() { InitializeComponent(); RegisterActions(components); } protected override void OnActivated() { base.OnActivated(); View.ControlsCreated += new EventHandler(View_ControlsCreated); } void View_ControlsCreated(object sender, EventArgs e) { if (Frame.Template is DevExpress.ExpressApp.Win.Templates.MainForm) { BarManager manager = ((MainForm)Frame.Template).BarManager; //put you code here... } } } }

P.S.
Can you please explain me what task you're trying to solve and for which purpose you need to achieve such an effect, because we might offer an alternative solution?
Thanks
Dennis

    Show previous comments (1)
    Dennis Garavsky (DevExpress) 17 years ago

      Thank you for the information. Please let me in case of any difficulty.
      Thanks
      Dennis

        I have the same question ,but the sample code does not work?

        Dennis Garavsky (DevExpress) 12 years ago

          @Bao Bo: Please create a separate Support Center ticket and post your problematic project where you implemented the suggested solution. We will examine it.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.