Can you set focus on a field within a repeater?

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Dave, Jon, Steve, Ian

User avatar
Jez
Ebase User
Posts: 31
Joined: Thu Aug 21, 2008 11:03 am
Location: Hampshire County Council

Can you set focus on a field within a repeater?

#1

Postby Jez » Mon Jun 15, 2020 2:46 pm

Hi

I have a repeater control which contains 3 fields from the table associated with it. I'm then looping though the table, checking the values of a particular column. If the check fails I would like the focus to be set to the problem cell. My check is working but the setfocus on the failed column is not working. Is this possible to do?

Cheers
0 x
--------------------------------------
Jez Hollinshead - Hampshire CC

Steve
Moderator
Moderator
Posts: 361
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

Re: Can you set focus on a field within a repeater?

#2

Postby Steve » Wed Jun 17, 2020 8:29 am

Hi Jez,

You should be able to loop through the table and request focus:

e.g

Code: Select all

while(rows.next())
{
  if(!tables.Customers.name.value)
  {
    event.getOwner().addErrorMessage("Please Specify Name", false);
    tables.Customers.name.getColumnControl().requestFocus();
    break;
  }
}

I hope this helps.

Steve
0 x


Who is online

Users browsing this forum: No registered users and 13 guests