Thursday, November 27, 2008

Set focus on a particular field on an EP page

With the AX 2009 Enterprise Portal you now have an easy way to set focus on a particular field on a page.

These are the steps you need to go through:
  1. The field must be created as or converted to a TemplateField. The "Dynamics AX Bound Field Designer" helps you to that. Add the field to the "Selected Field" list, make it active and click "Convert to Template field"
  2. Switch to the Source view of the page.
  3. It seems like you have to add the label of the fields yourself. This is done by adding the following section to the XML of the TemplateField: HeaderText="<%$ AxLabel:@SYSxxxxx %>
  4. Finally add code to set the focus:

    TextBox TextBox = (TextBox)this.AxGroup1.FindControl("TextBox1");
    if (TextBox != null)


Unknown said...

Hi Palle,

How do you identify the group control within a grid?

Unknown said...

Hi Palle,

How do identify the control within a grid, what i want to do is after typing an item on a control within a grid it automatically moves to the third row within the same grid.

Palle Agermark said...

Hi Fernando,

It's been a while since I last worked in details with EP, so from the top of my head I don't have any good suggestions.

I will suggest that you post your question to the MS AX Community forum:

Best regards,