• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 706
  • Last Modified:

cfgrid and cfwindow

I'm trying to build an application similar to the one that is posted here:

Basically, this is the issue my application and this application are having:
1. Select a row in the grid
2. The window opens
3. Close the window
4. Try to select the same row already selected, to open the window again.  The window wont open unless you click on another row and go back to the previous row.

How can I make the window open again without having to select another row?

The application is using this piece of code to call the function that opens the window:
<cfajaxproxy bind="javascript:todetail({maingrid.id@change},{maingrid.firstname@none},{maingrid.lastname@none})" />

todetail is the JS function. maingrid is the grid's name. and the id is being passed to the function on change.

I on the other hand, am using   <cfajaxproxy bind="javascript:getDetails({files.id@click})" />
@click and still that doesn't work for me.

Any ideas?

Thank you!

  • 2
1 Solution
Have you tried to use an onFocus event instead of onChange?
HumanScaleDevAuthor Commented:
Hi Enrique,

I tried @click and onFocus and it didn't work. It seems like it doesn't want to call the JS function more than once when the binding has occurred.

I guess the question is, how can I call a function more than once when using cfajaxproxy bind ? Once the user clicks on a row it calls the function but it won't work again unless you click on another row first.
HumanScaleDevAuthor Commented:
I found the solution at Raymond Camdem Coldfusion Blog: See post 25 & 34.

Add this to the JS function, that will unselect the row, allowing the user to select the same row again and open the same cfwindow. :)

mygrid = ColdFusion.Grid.getGridObject(gridname);
sm = mygrid.getSelectionModel()

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now