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
Focus Filter by text tool bar item on showing a list view
Answers approved by DevExpress Support
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
@Bao Bo: Please create a separate Support Center ticket and post your problematic project where you implemented the suggested solution. We will examine it.