Grid Selection criteria from client side

Use this board to ask questions or have discussions with other Rich Displays users.
HowardA
Profound User
Posts: 29
Joined: Fri Feb 08, 2013 8:34 am
First Name: howard
Last Name: Arner
Company Name: Citco Sys
State / Province: Georgia
Country: United States
Contact:

Re: Grid Selection criteria from client side

Post by HowardA »

Thanks Scott, binding directly to the field did show the data upon launch.
Now the next question is, I want to update the data in the grid based on a value on the screen (without returning to the RPG). I used this in an "onclick" event of a button to test:
getObj("selcovtrn"); changeElementValue("selcovtrn", "B"); alert(get("selcovtrn")); getObj("sflCovTrn").grid.refresh();
The alert was to see that I had the value from the field. When I execute this, it flashes the grid but doesn't update it with the new data (selection criteria changed).
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Grid Selection criteria from client side

Post by Scott Klement »

Ahh, I see.. well, in that case, you probably don't want the field to be bound to the RPG field. Instead, you want to do something like this:

Code: Select all

applyProperty("sflCovTrn", "parameter value", "B");
applyProperty("sflCovTrn", "field type", "grid");
getObj("sflCovTrn").grid.refresh();
getObj("sflCovTrn").grid.render();
Or, if you want to get the 'B' from a screen field, you want to do this:

Code: Select all

applyProperty("sflCovTrn", "parameter value", get("selcovtrn"));
applyProperty("sflCovTrn", "field type", "grid");
getObj("sflCovTrn").grid.refresh();
getObj("sflCovTrn").grid.render();
HowardA
Profound User
Posts: 29
Joined: Fri Feb 08, 2013 8:34 am
First Name: howard
Last Name: Arner
Company Name: Citco Sys
State / Province: Georgia
Country: United States
Contact:

Re: Grid Selection criteria from client side

Post by HowardA »

Thanks!!!! I can't wait to try it out
HowardA
Profound User
Posts: 29
Joined: Fri Feb 08, 2013 8:34 am
First Name: howard
Last Name: Arner
Company Name: Citco Sys
State / Province: Georgia
Country: United States
Contact:

Re: Grid Selection criteria from client side

Post by HowardA »

Exactly what I was looking for! Works great, thanks Scott!
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests