cfgrid and cfwindow

Posted on 2009-12-16
Last Modified: 2013-12-16
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.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({})" />
@click and still that doesn't work for me.

Any ideas?

Thank you!

Question by:HumanScaleDev
    LVL 11

    Expert Comment

    Have you tried to use an onFocus event instead of onChange?

    Author Comment

    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.

    Accepted Solution

    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()

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
    Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
    The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Click on Too…
    The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now