0 Replies Latest reply on May 24, 2012 12:24 PM by WebolutionDesigns

    cfgrid refresh after cfc onchange call

    WebolutionDesigns Level 1

      I have a cfgrid that uses binding to call my cfcs to make appropriate edits to the data (update, insert, delete, etc.). Here is my issue...when I make a change to some data in a field within the grid, it is getting updated  within the db, but the grid's styling still looks like it has not updated (the red triangle is in the corner of the field). Has anyone out there run across this and have a way to refresh or remove that triangle in some way? I have messed with the refreshgrid functionality but canot figure out how to call that after my onchange event. It seems unnecessary to refresh the grid when the data has already changed. I am basically looking for a way to not have my end users confused.


      For what it is worth, here is my code...



      <!--- Proxy for add/delete calls to the CFC--->
      <cfajaxproxy cfc="cfc.users" jsclassname="dataproxy">
      <cfset args = structNew()>
      <cfset args.name = "usergrid">
      <cfset args.format = "html">
      <cfset args.bindOnLoad = "true">
      <cfset args.bind = "cfc:cfc.users.getUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
      <cfset args.stripeRows = true>
      <cfset args.selectColor = "##E3A20D">
      <cfset args.selectmode = "edit">
      <cfset args.align = "left">
      <cfset args.autowidth = "no">
      <cfset args.bgColor = "##FFFFFF">
      <cfset args.colHeaderAlign="left"> 
      <cfset args.colHeaderBold = "yes"> 
      <cfset args.colHeaderFont = "Arial, Helvetica, sans-serif"> 
      <cfset args.colHeaderFontSize = "1.4em"> 
      <cfset args.colHeaderTextColor = "##354914">
      <cfset args.font = "Arial, Helvetica, sans-serif">
      <cfset args.fontsize = "1.4em">
      <cfset args.gridDataAlign = "left"> 
      <cfset args.gridLines = "yes"> 
      <cfset args.insert = "yes">
      <cfset args.delete = "yes"> 
      <cfset args.preservePageOnSort = "yes">
      <cfset args.rowHeight = "100"> 
      <cfset args.selectOnLoad="no"> 
      <cfset args.sort = "yes"> 
      <cfset args.sortAscendingButton = "Sort Ascending"> 
      <cfset args.sortDescendingButton = "Sort Descending"> 
      <cfset args.stripeRowColor = "##658C26">
      <cfset args.target = "_self"> 
      <cfset args.textColor = "##333333"> 
      <cfset args.width = "600px">
      <cfset args.onchange = "cfc:cfc.users.editUser({cfgridaction},{cfgridrow},{cfgridchanged})"> 
      <cfgrid attributeCollection="#args#">
      <cfgridcolumn name="ID" display="false">
      <cfgridcolumn name="FIRSTNAME" header="First Name">
      <cfgridcolumn name="LASTNAME" header="Last Name">
      <cfgridcolumn name="EMAIL" header="Email">
      <cfgridcolumn name="DATECREATED" header="Date Created" mask="m/d/Y" type="date">
      <cfgridcolumn name="APPROVED" header="Approved" type="boolean">
      <cfgridcolumn name="DELETED" header="Delete" type="boolean">
      <cfset ajaxOnLoad("init")>