CFGRID search

I have a cfgrid with cfc binding. Also I have an cfinput box to filter the grid records by passing the cfinput box id in curly braces along with the bind expression in the cfgrid tag. The cfc method to get the grid data refers some session variables. The search works only within the session timeout period. If user search after session timeout period it throws javascript exception. I tried onKeyUp of cfinput I checked the session timeout and if it is true then refresh the grid otherwise alert the user saying your session is time out. However this doesn't work for me.  Please help me on this

Do for a start:
<cfinput> in place of <input>
<cfselect> in place of <select>
</cfform> in place of <form>

Similar Messages

  • Bound CFSelect not working (with or without search box)

    Hello,
    I'm on WS2008 (64-bit) with IIS and CF9.0.1 (32 bit) and can't seem to get a bound CFSelect to work at all. CFGrid and other AJAX contriols work great. The code (shown below) appears to run without errors but the option tags are never generated.The binding CFC method returns a query with the data I want (I can see it on a dump) but is dropped by CF somehow.
    Ideally I want to use this approach on several complex forms but need to get something working first. Removing the lookup doesn't help either. I'm pulling this Oracle data via the 10G Client's ODBC driver.
    I've been working on CF forever (4-9) and never was stumped like this. Otherwise CF 9 On this server is running without a hitch.
    Long term I'm trying to move away from our Flash/Actionscript equivilants and move toward AJAX. But I'm stuck. Please help!
    Thanks
    Tim
    Index.cfm
    <cfparam name="form.lookup" type="string" default="A">
    <cfform preservedata="Yes">
        Search: <input type="text" name="lookup" id="lookup"><br />
        <cfselect name="Emp" bind="cfc:application.getEmpList({lookup})" value="EMPL_NBR" display="EMPL_NM">
            <option value="00000000">--- No Employees ---</option>
        </cfselect>
    </cfform><br>
    <!--- Just for Testing --->
    <cfinvoke component="Application" method="getemplist" returnVariable="qRead">
    <cfinvokeargument name="likename" value="#form.lookup#">
    </cfinvoke>
    <cfdump var="#qRead#" output="browser">
    Application.cfc
    <cffunction name="getEmpList" access="remote" returntype="query" output="yes">
        <cfargument name="LikeName" type="string" required="yes"> 
        <cfquery name="Emps" datasource="#application.dsn#" maxrows=50>
            Select EMPL_NBR, EMPL_NM from MNDOT_EMPLOYEE
            Where EMPL_STAT_CD = 'A'  <cfif isdefined("LikeName")> and upper(Empl_Nm) like '%#ucase(likename)#%'</cfif>
            Order By Empl_NM</cfquery>
        <cfreturn emps>
    </cffunction>
    Message was edited by: CFTim1965
    Message was edited by: CFTim1965

    Turns out that bound (used for the CF AJAX tags) CFCs are processed by the Application.cfc event methods like CFMs are and will have any HTML tags added in. When my method returned the query it had all my template code at the top (and some on the bottom). I used the code (in the Application.cfc) below to only write the HTML when the CFM pages are processed. Hope this helps! There a lot of misleading half truths out the about this issue.
    <cffunction name="onRequestStart">
        <cfargument name="targetpage" type="string" required="true">
        <cfset var isCFM  =  (lcase(ListLast(arguments.targetPage, '.')) eq 'cfm') />
        <cfif isCFM>
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">
            <body>
            <cfset AppHeader() /><!---  Create the Template Header --->
        </cfif>
    </cffunction>

  • Cfgrid in Cf7

    Hi,
    I have the search page for user to search the purNO and display resutls in the list.  I am tring to do the paging but keep got an error for cf 7 not supported the PAGESIZE,BIND.  Please advice with the code below to have it works in colfusion 7.
    Thanks
    <!---form--->
    <cfparam name="variables.row_per_page_default" default="15">
    <cfform name="tableform">
    <cfgrid format="html"
    name="grid_Tables"
    pagesize="#variables.row_per_page_default#"
    selectmode="row"
    bind="cfc:cfc.query.pur{purNO},{cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsor tdirection})">
    <cfgridcolumn name="purNO" display="Purchase No"/>
    <cfgridcolumn name="date_modified" header="Date Modified" >
    </cfgrid>
    </cfform>
    <!---cfc--->
    <cffunction name="purNo" returntype="query" access="public">
    <cfargument name="purNO" required="yes" type="numeric" />
    <cfargument name="page" required="yes">
    <cfargument name="pageSize" required="yes">
    <cfargument name="gridsortcolumn" required="yes">
    <cfargument name="gridsortdirection" required="yes">
    <cfquery name="qPur" datasource="#variables.dsn#">
         SELECT *
        FROM tbl_pur
        WHERE purNO = <cfqueryparam  value="#arguments.purNO#" cfsqltype="cf_sql_integer" />
        </cfquery>
    <cfreturn queryconvertforgrid(qPur, page, pagesize) />
    </cffunction>

    <cfgrid format="xml"
    what's about xml format?, grid is worked but is there the way you can have  pagination?
    thanks

  • CFGrid error when input too long

    Hello,
    We have a grid that is bound to fields in search criteria form to filter the grid results.  The actual screen has 10 search fields, but the basic code looks like this:
    <cfgrid name="gridReports" format="html" bindOnLoad="false" selectOnLoad="true"
           bind="cfc:getReports({cfgridpage}, {cfgridpagesize}, {cfgridsortcolumn}, {cfgridsortdirection}, {form:field1@none}, {form:field2@none}, {form:field3@none} )">
                   <cfgridcolumn name="column1" header="Column Name" >
                   <cfgridcolumn name="column2" header="Column Name" >
                   <cfgridcolumn name="column3" header="Column Name" >
    We have this running in 2 matching environments.  In one environment, this runs without any problems.  However in the other, when you fill in many serach fields or enter some long text into a few, it will return " Error invoking CFC [cfc filename]: Not Acceptable."  If you limit the search values entered, then the search runs just fine.  Any ideas on what may be causing the error and/or why it is only happening in one environment?
    Thanks for your help.

    cfc:getReports(
    That doesn't look right to me. I miss the CFC's name. A dotted path to the CFC may also be relevant. Path is certainly one factor that may differ between servers.

  • Cfgrid error -very urgent, pls help

    Hi all,
           I am working on a cfgrid to populate records and also there is a search button used for searching too. But when I enter a keyword and click search,
    grid will show correct records needed. But if I clicked 3 or 4 times search button after entering keyword, an error comes as follows "CFGRID: Response is empty [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]" .From application.log, I got this error mesage - The row number 0 is out of bounds. The specific sequence of files included or processed is:
    What is the problem actually ?
    When search button clicked, I am using Coldfusion.Grid.refresh to bind the grid.. and also I am fetching records from a text file, which contains about 3000 records.
    And also when I tested this with 15 records in a text file, this error is not coming...
    Atleast can you provide any mechanism to hide the error..
    I have tried try catch method, but failed to catch the error...
    Please help...

    I've just read this thread three times and I have absolutely no idea what you are doing, in what version, and what you are asking for help with.
    Do you want to change the message type? If you do you MUST drop the queue and start over again from the beginning.
    Do you want to enqueue messages?
    Post your DDL and other relevant information or you are on your own. We can not guess at your issue.

  • EnterKey in cfgrid

    I have the search form with three fields: city, state, and enter date.  The results are displayed in the cfgrid.  Currently, when i enter search criteria, i have to use the tab kep to refresh the data from the cfgird's results.  Instead of using the tab key, i need to use the enter key.  I don't know if i have the correct way but the code i have below didn't work because more arguments from cfgrid than cfc(i have extra the getSearchString () from cfgrid)
    can you help with this?
    Thanks
    <!---my cfc-->
    <cffunction name ="cf_city" access="remote" returnpe="struct">
         <cfargument name ="page" required="true" />
         <cfargument name = "pageSize" required="true" />
         <cfargument name ="gridsortcolumn" required="true" />
         <cfargument name ="gridsortdirection required="true" />
         <cfargument name="city" required="true" type="string" />
         <cfargument name ="state" required="true" type="string" />
         <cfargument name ="date" required="true" type="date" />
    </cffunction>
    <!---my form.cfm--->
    <cfform name="search" action="##" method="post" onsubmit ="ColdFusion.Grid.refresh("myGrid", false);">
    <cfinput type="text" name="city" id="city">
    <cfinput type="text" name="state" id="state">
    <cfinput type="datefield" name="date" id="date">
    </cfform>
    <!---scrpt function--->
    <script>
      getSearchString = function() {
       var s ={};
         s.city=ColdFusion.getElementValue("city");
         s.state=ColdFusion.getElementValue("state");
         s.date= ColdFusion.getElementValue("date");
    return s;
    </script>
    <!---diplay on the cfgrid--->
    <cfgrid
         name="myGrid"
         format="HTML"
         title="search result"
         selectMode="Single"
         pagesize= "20"
         bindOnLoad ="true"
        bind = "cfc.myapp.cfc.filter.cfc_city ({cfridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},getSearchString(), {city},{state};{date})">
         <cfgridcolumn name="city" header="city">
         <cfgridcolumn name="state" header="state">
    </cfgrid>
    thanks

    kt03 wrote:
    I have the search form with three fields: city, state, and enter date.  The results are displayed in the cfgrid.  Currently, when i enter search criteria, i have to use the tab kep to refresh the data from the cfgird's results.  Instead of using the tab key, i need to use the enter key.  I don't know if i have the correct way but the code i have below didn't work because more arguments from cfgrid than cfc(i have extra the getSearchString () from cfgrid)
    can you help with this?
    Thanks
    <!---my cfc-->
    <cffunction name ="cf_city" access="remote" returnpe="struct">
         <cfargument name ="page" required="true" />
         <cfargument name = "pageSize" required="true" />
         <cfargument name ="gridsortcolumn" required="true" />
         <cfargument name ="gridsortdirection required="true" />
         <cfargument name="city" required="true" type="string" />
         <cfargument name ="state" required="true" type="string" />
         <cfargument name ="date" required="true" type="date" />
    </cffunction>
    Suggestions:
    <cfcomponent>
    <cffunction name ="cf_city" access="remote" returnpe="struct">
    <cfargument name ="page" required="true" />
    <cfargument name = "pageSize" required="true" />
    <cfargument name ="gridsortcolumn" required="true" />
    <cfargument name ="gridsortdirection" required="true" />
    <cfargument name="city" required="true" type="string" />
    <cfargument name ="state" required="true" type="string" />
    <cfargument name ="date" required="true" type="date" />    
    <!--- return at least an empty query to avoid errors,  enabling you to test --->
    <cfset var myQuery = querynew("")>    
    <cfreturn queryconvertforgrid(myQuery, page, pagesize) />
    </cffunction>
    </cfcomponent>
    <!---my form.cfm--->
    <cfform name="search" action="##" method="post" onsubmit ="ColdFusion.Grid.refresh("myGrid", false);">
    <cfinput type="text" name="city" id="city">
    <cfinput type="text" name="state" id="state">
    <cfinput type="datefield" name="date" id="date">
    </cfform>
    <!---scrpt function--->
    <script>
      getSearchString = function() {
       var s ={};
         s.city=ColdFusion.getElementValue("city");
         s.state=ColdFusion.getElementValue("state");
         s.date= ColdFusion.getElementValue("date");
    return s;
    </script>
    <!---diplay on the cfgrid--->
    <cfgrid
         name="myGrid"
         format="HTML"
         title="search result"
         selectMode="Single"
         pagesize= "20"
         bindOnLoad ="true"
        bind = "cfc.myapp.cfc.filter.cfc_city ({cfridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection },getSearchString(),{city},{state};{date})">
         <cfgridcolumn name="city" header="city">
         <cfgridcolumn name="state" header="state">
    </cfgrid>
    Suggestions:
    1) Place the closing form tag </cfform> after the grid.
    2) Give the datefield a default value.
    3) Begin the bind expression with "cfc:", not "cfc.".
    4) Correct the spelling of the name of the function in the bind. It is "cf_city", not "cfc_city".
    5) Remove getSearchString() from the arguments list in the bind.
    6) Replace the semicolon in {state};{date} with a comma.
    The result should be something like
    <cfform name="search" action="##" method="post" onsubmit ="ColdFusion.Grid.refresh('myGrid', false);">
        <cfinput type="text" name="city" id="city">
        <cfinput type="text" name="state" id="state">
        <cfinput type="datefield" name="date" id="date" value="#now()#">
        <cfgrid
             name="myGrid"
             format="HTML"
             title="search result"
             selectMode="Single"
             pagesize= "20"
             bindOnLoad ="true"
             bind = "cfc:myapp.cfc.filter.cf_city({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsor tdirection},{city},{state},{date})">
             <cfgridcolumn name="city" header="city">
             <cfgridcolumn name="state" header="state">
        </cfgrid>
    </cfform>

  • HOW TO: Filter Data in a html CFGRID with the query attribute defined

    Does anyone know how I can filter the data of a html cfgrid,
    not throught an AJAX bind, but perhaps by exposing some
    functionality of the EXT code behind the cfgrid???
    Any help would be greatly appreciated.
    jorge loyo

    Got It!!!
    MY INPUT:
    <input
    id="searchString"
    name="searchString"
    type="text"
    onkeyup="ColdFusion.Grid.getGridObject('dg').getDataSource().filterBy(myfilterfunc)"/>
    MY FUNCTION
    <script>
    function myfilterfunc(record, id){
    var string =
    document.getElementById("searchString").value.toUpperCase();
    var columnArray = new Array("FIRST_NAME","LAST_NAME");
    //loop through record columns
    for(col_id in record.data){
    colName = col_id.toUpperCase();
    colValue = record.data[colName].toString().toUpperCase();
    //loop through list of columns to search in
    for(i=0; i<columnArray.length; i++){
    col2filter = columnArray
    .toString().toUpperCase();
    if(colName == col2filter && colValue.indexOf(string)
    > -1) return true;
    return false;
    </script>
    MY GRID:
    <cfgrid
    name="dg"
    query="employees"
    format="html">
    <cfgridcolumn name="first_name" header="FName">
    <cfgridcolumn name="last_name" header="LName">
    </cfgrid>

  • Height of CFGrid

    Dear all,
    Is there a way to set height of the header of CFGrid?
    I know the "Height" property is to set the height of the grid
    and "rowHeight" is to set the height of the row. How about the
    height of the Header?
    Is there a site (beside asfusion) where I can see the various
    samples of CFGrid in term of the look / style?
    Looking forward for your reply.
    Thanks in advance
    Keiko

    Thank you so much for that blog.  I was able to find ext-all.css to get a list of all the .x-grid styles.  So I was able to make my column headers wrap by using: .x-grid-hd-row td {white-space:normal; text-decoration:none; vertical-align:bottom}
    Do you know of a way to set the background and text color of a CFGrid's cell?  The valid values of the cell are Red, Green, Yellow and null/no color change.  I'm using CF8, CFGrid format=HTML, IE 7.  I've searched and found Ext's getRowClass, but I need to set the color of a cell based on the cell's value.  Thanks.

  • Getting cfgrid (flash) to submit a row

    Hi all,
    I'm at about my wits end on this...I can submit a row from a query set in cfgrid if I set it to format=html and it works just fine.  However, with that format, I cannot sort columns which is necessary.  So, I set format=flash and the formatting works great, but I cannot submit a row for processing.  I've searched Google, Google Groups, Adobe, everyplace to no avail.  Plenty of "Working" solutions, but none work for me.  Below is the latest attempt:
    <cfform name="logForm">
         <cfgrid name="propOppGrid" height="500" selectmode="row" autowidth="true" format="flash" query = "session.allDefects" onchange="getUrl('cqStatus_s1.cfm?CFGRIDKEY='+propOppGrid.selectedItem.id, '_blank'); ">
    The query does indeed have a row called "ID" and it does display properly in the grid itself.  When I submit the form (which does indeed open up a new window ('_blank'), I get the following on my url and a blank page is displayed.
    "cqStatus_s1.cfm?CFGRIDKEY=undefined"
    If I put the ID into the url manually, the data on that page will display properly.  I've tried other query column names (checking for the possibility that ID is reserved) with the same results.
    VERY FRUSTRATED!!!!
    Any help is GREATLY appreciated.

    It works for me! I reproduced your scenario as follows.
    testForm.cfm
    <!--- The table animals has 2 columns (id, common_name) and 3 rows --->
    <cfquery name="session.allDefects" datasource="cfmx_db">
    select *
    from animals
    </cfquery>
    <cfform name="logForm">
         <cfgrid name="propOppGrid" height="500" selectmode="row" autowidth="true" format="flash" query = "session.allDefects" onchange="getUrl('cqStatus_s1.cfm?CFGRIDKEY='+propOppGrid.selectedItem.id, '_blank');" />   
    </cfform>
    cqStatus_s1.cfm
    <cfdump var="#url#">
    Query string: <cfdump var="#CGI.QUERY_STRING#">
    The grid displays as expected. When I click on a row, the page cqStatus_s1.cfm pops up, displaying the id corresponding to the row. You might like to know that I am on ColdFusion 10.0.13.287689.

  • "Please Wait Message" Slider with cfgrid

    Some of my cfgrid type=html results are taking a long time
    and an impatient user will likely wander if they need to hit the
    submit button again. I've seen how to implement a standard "Please
    Wait Message" with flushing periodic results, but how do I do it in
    this datagrid environment with an AJAX-based cfgrid with CF8.01? My
    users all use IE 6.

    I believe I did. Here's the code. Functions without the line
    "grid.loadMask = true;"
    <HTML>
    <HEAD>
    <cfajaximport
    tags="cfform,cfdiv,cftextarea,cflayout-tab,cflayout-border,cfinput-datefield,cfgrid"
    />
    <script type="text/javascript" >
    <cfajaxproxy cfc="#strcomponentpath#"
    jsclassname="diaproxy" />
    diaproxy = new diaproxy();
    diaproxy.setCallbackHandler(handleResult);
    function initDIA(){
    //set page permissions
    setstartuppermissions();
    //the grid will be empty, but will have the default layout
    customizeGrid();
    // Set the focus to the first search field for those that
    prefer to not use a mouse
    setFocus();
    function setFocus(){
    var objFirstField = document.frmSearchGrid.strsearchdb[0];
    objFirstField.focus();
    <!--- this function is called when the Search button is
    clicked --->
    function submitSearch(){
    //refresh grid with new parameters
    setpermissions('test');
    ColdFusion.Grid.refresh("searchGrid", true);
    customizeGrid();
    <!--- this function is called to refresh grid (hiding
    columns and customizing grid footer) --->
    function customizeGrid(){
    <!--- Create a new paging tool bar in the grid footer and
    display the record count in it. --->
    // get the grid component
    var grid = ColdFusion.Grid.getGridObject("searchGrid");
    // Create a reference to the column model.
    var cm = grid.getColumnModel();
    // create a reference to the grid footer
    var gridFoot = grid.getView().getFooterPanel(true);
    // get the datasource
    var ds = grid.getDataSource();
    // add a new paging toolbar to the grid's footer
    var paging = new Ext.PagingToolbar(gridFoot, ds, {
    // this pageSize is the same value as in the cfgrid
    pageSize: <cfoutput>#intShowRows#</cfoutput>,
    displayInfo: true,
    // this will display all the record information for you
    displayMsg: 'Displaying records {0} - {1} of {2}',
    emptyMsg: "No records to display"});
    //returns true if the particular radio button is selected
    var booDocumentImaging =
    document.frmSearchGrid.strsearchdb[0].checked;
    var booFilenet =
    document.frmSearchGrid.strsearchdb[1].checked;
    // Now show/hide grid columns and data details based on
    default or user choice
    if (booDocumentImaging) {
    document.getElementById('divFilenetFields').style.display =
    'none';
    document.getElementById('divDocumentImagingFields').style.display =
    'block';
    //setHidden(colIndex, hidden)
    cm.setHidden(18,true);
    // If true then Filenet was selected
    else if (booFilenet) {
    document.getElementById('divFilenetFields').style.display =
    'block';
    document.getElementById('divDocumentImagingFields').style.display =
    'none';
    // Filenet does not need the ability to add an attachment
    document.getElementById('btnaddAttachment').disabled='true';
    //setHidden(colIndex, hidden)
    cm.setHidden(18,false);
    else {
    // add a Please Wait Message on submittals
    grid.loadMask = true;
    grid.reconfigure(grid.getDataSource(),cm);
    </script>
    </HEAD>
    <BODY class="bodyclass" onLoad="" onUnload="">
    <cfform name="frmSearchGrid" id="frmSearchGrid"
    format="html" method="post" >
    <cfgrid name="searchGrid"
    autowidth="false"
    width="585"
    format="html"
    pagesize="#intShowRows#"
    preservePageOnSort="true"
    striperows="true"
    striperowcolor="##e0e0e0"
    sort="true"
    sortascendingbutton="true"
    sortdescendingbutton="true"
    colheaderbold="true"
    bindonload="false"
    bind="cfc:#strcomponentpath#.readdiadocumentgrid({cfgridpage},{cfgridpagesize},{cfgridsor tcolumn},{cfgridsortdirection},{frmSearchGrid:strsearchdb@none},{frmSearchGrid:strsearchme tadata@none},{frmSearchGrid:dtedateRangeFrom@none},{frmSearchGrid:dtedateRangeTo@none},{fr mSearchGrid:strDocImageRights},{frmSearchGrid:strdoctype@none},{frmSearchGrid:strdocsubjec t@none})">
    <cfgridcolumn name="diadocno" header="docno" width="70"
    />
    <cfgridcolumn name="diadocumentdate" header="doc date"
    width="75" />
    </cfgrid>
    </cfform>
    <cfset ajaxOnLoad("initDIA") />
    </BODY>

  • Cfgrid edit working, delete is not working

    When I select a row and try to delete it, I get "Error invoking CFC _admin_cfc_contacts.cfc : OK [Enable debugging by adding 'cfdebug' to your URL parameters to see more information]"
    Here is my cfgrid code...
    <cfset args = structNew()>
    <cfset args.name = "contact_grid">
    <cfset args.format = "html">
    <cfset args.query = "biz_contacts">
    <cfset args.stripeRows = "yes">
    <cfset args.bgcolor = "FFFFFF">
    <cfset args.colheaderalign = "left">
    <cfset args.colheaderbold = "yes">
    <cfset args.delete = "yes">
    <cfset args.griddataalign = "left">
    <cfset args.multirowselect = "yes">
    <cfset args.insert = "yes">
    <cfset args.selectcolor = "FF6633">
    <cfset args.height = "500">
    <cfset args.selectmode = "edit">
    <cfset args.autowidth = "yes">
    <cfset args.onchange = "cfc:_admin_cfc_contacts.edit_grid({cfgridaction},{cfgridrow},{cfgridchanged})">
    <div style="padding-top: 20px; padding-left: 20px; padding-right: 20px;">
        <cfform name="test">
        <cfgrid attributeCollection="#args#">
            <cfgridcolumn name="id" display="false">
            <cfgridcolumn name="business_name" header="Biz Name">
            <cfgridcolumn name="name" header="Contact Name">
            <cfgridcolumn name="address" header="Address">
            <cfgridcolumn name="link" header="Link">
            <cfgridcolumn name="city" header="City">
            <cfgridcolumn name="state" header="State">
            <cfgridcolumn name="phone" header="Phone">
            <cfgridcolumn name="email" header="Email">
            <cfgridcolumn name="website" header="Website">
            <cfgridcolumn name="contacted" header="Contacted">
        </cfgrid>
        </cfform>
    </div>
    And here is my .cfc code...
    <cffunction name="edit_grid" access="remote">
        <cfargument name="gridaction" type="string" required="yes">
        <cfargument name="gridrow" type="struct" required="yes">
        <cfargument name="gridchanged" type="struct" required="yes">
        <cfset var colname = "">
        <cfset var value = "">
        <cfswitch expression="#arguments.gridaction#">
            <!--- update --->
            <cfcase value="U">
                <cfset colname = StructKeyList(arguments.gridchanged)>
                <cfset value = arguments.gridchanged[colname]>
                <cfquery datasource="mydsn">
                UPDATE mytable
                SET #colname# = '#value#'
                WHERE id = <cfqueryparam value="#arguments.gridrow.id#" cfsqltype="cf_sql_integer">
                </cfquery>
            </cfcase>
            <!--- delete --->
            <cfcase value="D">
                <cfquery datasource="mydsn">
                DELETE FROM mytable
                WHERE id = <cfqueryparam value="#arguments.gridrow.id#" cfsqltype="cf_sql_integer">
                </cfquery>
            </cfcase>
        </cfswitch>
    </cffunction>

    Did you ever resolve this issue?
    I know your post is pretty old, now - I'm old, too - but I had the same problem and, I think, for the same reason.
    I also think I just found a fix, that I can't recall having been shared in any of my recent searches on this topic.
    Using your cfc code, these are comments and these are revisions ...
    <cffunction name="edit_grid" access="remote">
        <cfargument name="gridaction" type="string" required="yes">
        <cfargument name="gridrow" type="struct" required="yes">
        <cfargument name="gridchanged" type="struct" required="yes">
        <cfset var colname = "">
        <cfset var value = "">
        <!--- *** Add/init' this variable; name it whatever_works_for_you. *** --->
         <cfset var row_pk_id = ""/>     
        <cfswitch expression="#arguments.gridaction#">
            <!--- update --->
            <cfcase value="U">
                <cfset colname = StructKeyList(arguments.gridchanged)>
                <cfset value = arguments.gridchanged[colname]>
              <!--- *** Add this statement to assign the value from "my_pk_column"; `id` in this case, but it was `quantity_tracking_id` in my case. *** --->
             <cfset row_pk_id = arguments.gridrow.id />
                <cfquery datasource="mydsn">
                UPDATE mytable
                SET #colname# = '#value#'
              <!--- *** Change this line ... *** --->
              <!---
                WHERE id = <cfqueryparam value="#arguments.gridrow.id#" cfsqltype="cf_sql_integer">
              --->
              <!--- *** ... to this. *** --->
              WHERE id = <cfqueryparam value = "#row_pk_id#" cfsqltype="cf_sql_integer">
                </cfquery>
            </cfcase>
            <!--- delete --->
            <cfcase value="D">
                   <!--- *** Likewise ... *** --->
                  <cfset row_pk_id = arguments.gridrow.id />
                <cfquery datasource="mydsn">
                DELETE FROM mytable
              <!--- *** ... and ... *** --->
              <!---
                WHERE id = <cfqueryparam value="#arguments.gridrow.id#" cfsqltype="cf_sql_integer">
                   --->
               WHERE id = <cfqueryparam value = "#row_pk_id#" cfsqltype = "cf_sql_integer">
                </cfquery>
            </cfcase>
        </cfswitch>
    </cffunction>
    I am unable to do little more than a weak SWAG at the why of the failure with the former and success with the latter, but, when I changed one line of code in the cfquery, my updates began working.
    My expertise is, shall we say, limited, perhaps "wading-depth", at best, but, while trying to figure it out yesterday ...
    I located the point-of-failure, the query, even though the err_msg was SO different from any cfquery/SQL fault message I've yet seen.
    I tried to look at and understand (a bit more of the former than the latter, to be sure) the debugging content generated by Firebug, which seemed to have more to do with the inability to find a resource; I think it was a something.gif.
    I saw that the resource was sought in a folder (our folks) installed (wisely or not) under the CFIDE folder.
    I know that our folks had recently locked down access to CFIDE,as well as any of its "children", cfgrid libraries/resources included.
    I knew that, after the lockdown, our folks created some sort of virtual-folder when I asked them to make the cfgrid functionality available to us again.
    Well, all this started me wondering about what, exactly, was going on that would fit into this particular scenario.
    That's when I looked at the query again and wondered if the issue might be direct use/reference in the cfquery of values residing in the more-complexly-structured arg's.  So, I decided to try what I suggest above, assignment to a simple variable and use of that variable in the cfquery.
    I'm sure that there are plenty of way-deeper folk than I who could go into particulars.
    I'm just tickled that I'm "back in business"!
    HTH,
    Steve in Memphis

  • Problems with CFGRID

    Ok, here is the scenario:
    I have a flash cfgrid, love it. I then wanted to give the
    user the ability to update the grid without having to open a new
    page with a new form, so I enabled edit. Then, I learnt that you
    cannot user select dropdowns in an flash editable grid, so I
    thought ok, I will have a form below the grid, I can bind the
    fields with the grid, then the user can click on any row they need
    to update, and then submit. CFGRIDUPDATE will then sort through the
    changes and bish bosh, we have a nice solution. However, I then
    learnt you cannot just bind a cfselect in the same way as you can a
    <cfinput. I have search for solutions but with no joy. I have
    two problems I need to fix;
    1) how to prepopulate the <cfselect with the data from the
    selected row, as you do with a cftext
    2) my <cfinput type=date field does not update the grid
    when changed (also, the grid doesn't change when I select a new
    date, but it does change to the previous one if I select a second
    one! weird!)
    Can anyone, please shed any light on this atall please?
    I attach my code and will try and provide as much info as
    possible, thanks in advance
    (Why do i always find a great solution like a flash grid, to
    then hit a brick wall like not being able to bind selects! aaarggh)
    :)

    Ok I did something similar with the HTML cfgrid as I had more
    data that could be visible to edit in the grid itself.
    First create a <cfinput type="hidden"/> for each select
    box with it bound to the grid like a normal text box.
    Second create a function to handle assigning of the hidden
    bound value to the CFSELECT:
    function populateCFSelect(Grid,rowIndex,e){
    var xyz = document.GridForm.hidden_xyz.value;
    document.GridForm.xyz.value = xyz;
    document.GridForm.xyz.text= xyz;
    Third and almost important you need to ad a listener to your
    Grid to run the function not sure if there is something differnet
    with a flash gridb but here is the code for the html grid:
    function init(){ //Build grid toolbars
    grid = ColdFusion.Grid.getGridObject("<NAME OF YOUR
    GRID>");
    grid.addListener("rowclick",populateCFSelect);
    Finally make sure your init() is being called at page
    load....<cfset ajaxOnLoad("init")>
    After you populate your inputs and select boxes you need to
    update your datasource with the changes then refresh your grid to
    show the changes. ColdFusion.Grid.refresh("<NAME OF YOUR
    GRID>");will refresh your grid.

  • CFGRID with bind to CFC for an incorrect JAVAScript

    Hi,
    I am using CF11 with SQL server 2012 & IIS8.0 on windows server 2012.
    When I am using a CFGRID bind to a CFC and passing 2 or more than 2 parameters from a FORM, it fails for an incorrect JavaScript.
    Using the below code:
    <cfgrid attributeCollection="#args#"
    bind="cfc:MaintenanceMenuComponent.getLookUpData({cfgridpage},{cfgridpagesize},{cfgridsortcolum n},{cfgridsortdirection},{appl},{search})"
           onchange="cfc:MaintenanceMenuComponent.editLookUpData({cfgridaction},{cfgridrow},{cfgridchanged})"
           onerror="errorHandler" bindOnLoad="true">
    Getting Result:
    JavaScript Error for:
    SyntaxError: missing ; before statement
    ...id'] = 'applid,appl,,value;'search,search,,value';var _cf_gridDataModel = Ext.cr...
    I have checked the Adobe blog and found that this type of bug (Bug ID# 3759630) is already reported and fixed in ColdFusion 11 Update 1 (Suggested by Anit Kumar Panda Ref: https://bugbase.adobe.com/index.cfm?event=bug&id=3759630).
    I have sent update request to '[email protected]' but did not receive any update from them yet.
    As this update is still not available on Adobe site, can anyone send me that link of the update or let me know if there any workarounds.
    Thanks in advance

    MAHI,
    The issue exists and is fixed. The fix would be made available in a future udpate. The error you are reporting seems different, though.
    The bind attribute appears to have a typo. Shouldn't "{cfgridsortcolum n}" just be "{cfgridsortcolum}", or is that intended?
    The email address that you wrote to for the fix seems correct. Can you pls. resend the request.

  • Cfgrid question

    I have a cfgrid that i initially load with my getRecords method in my cfc, which is just a select statement to return all the records. I have a search text field with a submit button. I have a method called getSearch in the same cfc with the extra parameter for the textfield value and I want to load the search results in into the same cfgrid. Does anybody have an idea on how to do this?
    my cfc is called records
    <cffunction name="getRecords" access="remote" returntype="struct">
      <cfargument name="page" required="true" />
      <cfargument name="pageSize" required="true" />
      <cfargument name="gridsortcolumn" required="true" />
      <cfargument name="gridsortdirection" required="true" />
    <cffunction name="getSearch" access="remote" returntype="struct">
      <cfargument name="page" required="true" />
      <cfargument name="pageSize" required="true" />
      <cfargument name="gridsortcolumn" required="true" />
      <cfargument name="gridsortdirection" required="true" />
        <cfargument name="searchtitle" required="yes" default="" />
        <cfinput type="text" name="search" id="search" size="50" />
        <cfinput type="submit" name="submitSearch" id="submitsearch" value="Search" />
        <cfgrid format="html" name="userGrid" pagesize="20" selectmode="row" bind="url:records.cfc?method=#functname#&page={cfgridpage}&pagesize={cfgridpagesize}&grid sortcolumn={cfgridsortcolumn}&gridsortdirection={cfgridsortdirection}&returnFormat=json" gridlines="yes">
                                <cfgridcolumn name="title" width="500" header="Title" />
                                <cfgridcolumn name="publicationdate" width="115" header="Publication" />
                                <cfgridcolumn name="delete" width="80" header="Delete" />
                                <cfgridcolumn name="edit" width="80" header="Edit" />
          </cfgrid>

    i do not use flash forms, but i remember reading posts and
    tutorials
    over on asfusion.com about exactly the thing you are trying
    to achieve.
    it is not trivial, though, so brace yourself...
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com

  • Cfgrid selectedIndex

    On my cfgrid I want to get to a certain record. I can do this
    as far as the
    record being selected after an update. What I want is to move
    to that record
    so it is visible. Is this possible? Right now the correct
    record in the
    cfgrid is selected but I have to scroll down to see it.
    Thanks for any help you can give!!!!
    var si = grid.selectedIndex
    var responseHandler = {};
    responseHandler.onResult = function( results: Object ):Void
    grid.dataProvider = results;
    mytab.selectedIndex = 0;
    grid.selectedIndex = si;

    I would say the problem has to be that the value is not being
    added to the url.
    Is there a reason your still using cfsavecontent ?
    To debug, I would do the following:
    1. Put in an
    Alert(searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'])
    To see if the value is being returned
    2. Put in a hard coded value and see if this works
    Let's assume a valid comment_key is "search", then
    getURL('comment.cfm?cfgridkey=' + 'search';
    How are you trying to access the value in the comment.cfm
    page ?
    I think by default it is URL.cfgridkey
    You can also include the attribute of "post" or "url" in the
    geturl function call.
    On reading the doc's about geturl, I can't see anything about
    a default value. So I would suggest putting it in
    getURL('comment.cfm?cfgridkey=' +
    searchResults.dataProvider[searchResults.selectedIndex]['COMMENT_KEY'],'_self',
    'GET');
    Ken

Maybe you are looking for

  • Can't open PDF's in MyPDFs or Kindle from within Safari and other problems

    When viewing a PDF within Safari, I am unable to execute a "read with" in MyPDFs or Kindle (I don't have iBooks). I have ios 5.  I've also been experiencing delayed keystroke response times and delayed lookups such as for contacts. Keystrokes seem to

  • How do I sync a Word document onto my iPad, using Adobe reader?

    My laptop can't connect to the Internet, so I'm trying to upload some critical documents to my iPad, using Adobe Reader. I've tried copying them via ITunes, and while the sync is supposedly successful, they don't show up in Reader on my inPad. Any su

  • How to display non-continuous lines in a 2D Line flash chart ?

    Hi I am making 2D lines charts. is there a way ig tehre are no data in the table, to not to display points ? For example I have a table with this data : Date     Value 01/01/09 2 02/01/09 7 03/01/09 4 05/01/09 3 06/01/09 2You see in the example anove

  • "Recently Played" playlist doesn't appear on iPod

    New video iPod 60 Gig. I can see the "Recently Played" playlist on iTunes, along with the others, but it doesn't appear on the iPod itself. I only get "Recently Added", "On-The-Go" and "90s Music" on the iPod. Is there something special that I have t

  • Calculations Using SQL Query

    Hi All, I am using Oracle Database Version 11.2. I have a formula (A-B)/[(A-B)/10]. The tables that are holding the rows for this calculations are given below: ROWS_TAB ====== =================== Row          Amount ====== =================== A