The steps which i tried was working now after turning off virtualized rows prop but it’s focusing frequently even aftr clicking on text field …it is focusing again and again on the same row
“I suggest you pass the params row[‘Id’] and IdTxt to the view and there, on a custom prop expression struct bound to these values, check if they match.
you might alse have to put a delay in before doing the focus… just to be sure”…
I am not able to understand this above method.
should I use sendMessage function again on checkbox view script after self.focus() or should I use it in Transform after this line “system.perspective.sendMessage(“RowFocus”)”
just a custom property which initial value is set so it will tigger the RowFocus.
And after receaving the message "FocusConfirmed" on the table it will be set so it nolonger send the message RowFocus
if not self.props.custom.confirmed:
system.perspective.sendMessage("RowFocus")
I tried it but not successful..I set the below custom prop to false but it was not triggering at all so passed value 0 and it passed the value 0 to custom prop
self.view.getChild("root").custom.Confirmed=0
and also passed bool(0) to custom prop..neither way worked
in transform below code added
if self.view.getChild("root").custom.Confirmed==1:
system.perspective.sendMessage("RowFocus")
self.props.selection.selectedRow=-1
same issue scroll frequently going up n down
And plz check below link ..will this work In my case? if yes then let me know how to do in perspective
see above img…the custom prop value not changed to false …after entering text field …the row got highlighted but not focused…
created row param in checkbox view as below…
and on checkbox view > message handler >below code written…
and this code written on main view table scrip> msg handler to pass the boolean value as false to custom prop of main view which is named as confirmed…
and on table data>transform> below code written
returned_rows.append(row_dict)
if not self.view.custom.confirmed:
system.perspective.sendMessage("RowFocus", payload={row:row['Id']})
self.props.selection.selectedRow=-1
I am getting this below error after trying the above steps …
Also, I would like to share that by following below steps, It’s triggering only one time focus and then custom property becomes false and if I manually ticked it to true then only it is focusing again and then again becoming false and focus stopped…this actually working but I can’t manually tick the custom property to focus again n again so I made it true on text field onKeyPress event …now its triggering it true and after entering it focusing once and again set false …cycle continues…
steps:
payload removed from checkbox script as well as from transform which initially suggested by you…
on main view > table >msg handler>focusConfirmed>written below code…
returned_rows.append(row_dict)
if self.view.custom.confirmed==bool(1) or self.view.custom.confirmed=="true":
system.perspective.sendMessage("RowFocus")
it’s working as expectednow …
Let me test it multiple times and will confirm you
Thanks a lot
ups yea it should be a string, also i guess row[‘id’] doesnt match the data index mb.
try len(returned_rows)-1 instead i guess system.perspective.sendMessage("RowFocus", payload={"row":(len(returned_rows)-1)})
No …only the last rows are getting searched/focused properly …starting rows or not … the scroller is moving slowly up after pressing enter on the text field multiple times…