1 Reply Latest reply on Feb 11, 2008 10:06 AM by cyber fyb

    Need to get the last selected index to pass to a button

    cyber fyb Level 1
      I have 3 buttons below the GRID: one to redirect to the edit page, one to redirect to the transfer page and one to redirect to the split page. Since I was not able to find a way to have the three buttons on each row of my cfgrid, I opted to put them below. The application concern helpdesk ticket.

      Naturally, when the user click on any of those buttons, the system will required to include the TICKETID in the url (as a parameter like TICKET=346 where 346 will be the selected row corresponding to that ticket). Everybody is talking about the onChange and everybody is talking about editable CFGRID but not a lot of people seems to have use the CFGRID in the way I need! Is it just me or this component is really hard when used with higher needs?? Anyway, I am not here to argue about it, I just want to pass over this so simple idea!!! Very easy to use bind in a form but the CFGRID seems to have a wall to not getting this same easiness!!!

      About the code I attached, consider the code inside a CFFORM in Flash.

      Thank you for any help!
        • 1. Re: Need to get the last selected index to pass to a button
          cyber fyb Level 1
          You know that programming can be sometime a big challenge when we are trying to get outisde those examples gave everywhere. But, I always think that everything is possible and I prove it again with this new problem I got.

          I knew, somehwere in my head, that it is possible to talk to the grid directly without establishing a remote connection to the grid itself. You will find my solution that reside on a function to call in between cfformitem type = script.

          As all those forums are crawled regularly and be available from a search query in GOOGLE (or any of your favourite search engine), I hope this will help any programmer who are looking for this same challenge and not finding enough in the documentation to respond to their needs. As you will see in the code, it is not so easy to pass the vlaue of the selected specific column/row of your grid. In fact, once the solution is found, everything will be more easy!

          Please note that my example include also a filter at the top of the grid.