<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CRUD with cfgrid html format</title>
	<atom:link href="http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/</link>
	<description>My thoughts on ColdFusion, Flex and other RIA stuff....</description>
	<lastBuildDate>Tue, 07 Feb 2012 10:21:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Wendy</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-18900</link>
		<dc:creator>Wendy</dc:creator>
		<pubDate>Wed, 11 Jan 2012 20:09:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-18900</guid>
		<description>Not sure what is happening - my code is getting replaced by something else.  If this doesn&#039;t work - I will try again later.  Sorry for clogging up this forum.

    

       
          
          
          
          
          
          
       
    

    
        
        Please Confirm this action.
        
        
        
        
    
    
    
        
            
                
                    Hours:
                    
                
                
                    Work Completed:
                                #WorkCompl#
                    
                
                
                    
                
             
             
        
    </description>
		<content:encoded><![CDATA[<p>Not sure what is happening &#8211; my code is getting replaced by something else.  If this doesn&#8217;t work &#8211; I will try again later.  Sorry for clogging up this forum.</p>
<p>        Please Confirm this action.</p>
<p>                    Hours:</p>
<p>                    Work Completed:<br />
                                #WorkCompl#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wendy</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-18899</link>
		<dc:creator>Wendy</dc:creator>
		<pubDate>Wed, 11 Jan 2012 20:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-18899</guid>
		<description>Lets try it one more time - it appears that I can&#039;t include the entire code for the CFGRID so - here is the snippet that was used:

    

       
          
          
          
          
          
          
       
&lt;!---       
       
---&gt;
    

    
        
        Please Confirm this action.
        
        
        
        
    
    
    
        
            
                
                    Hours:
                    
                
                
                    Work Completed:
                                #WorkCompl#
                    
                
                
                    
                
             
             
        
    </description>
		<content:encoded><![CDATA[<p>Lets try it one more time &#8211; it appears that I can&#8217;t include the entire code for the CFGRID so &#8211; here is the snippet that was used:</p>
<p>&lt;!&#8212;       </p>
<p>&#8212;&gt;</p>
<p>        Please Confirm this action.</p>
<p>                    Hours:</p>
<p>                    Work Completed:<br />
                                #WorkCompl#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wendy</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-18897</link>
		<dc:creator>Wendy</dc:creator>
		<pubDate>Wed, 11 Jan 2012 20:03:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-18897</guid>
		<description>UPDATE on CODE:

Somehow my copy/paste skills went awry!!!  Here is my code:

CFC:




   
   
   
   

   
      
      
   
   
	
		SELECT *
		FROM PTS_Work
        WHERE PersonnelID = #PID# AND
              ProjectID = #URL.PROJECTID#
	 
            order by #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdirection#
         
	

    
    
&lt;!---	  ---&gt;    
    
    
	          &lt;!--- the message to display --&gt; 
            You&#039;ve Thrown a Database &lt;b&gt;Error&lt;/b&gt; 
             
                &lt;!--- and the diagnostic message from the ColdFusion server --&gt; 
                #cfcatch.message# 
                Caught an exception, type = #CFCATCH.TYPE#  
                The contents of the tag stack are: 
                 
                     
                    #i# #sCurrent[&quot;ID&quot;]#  
                        (#sCurrent[&quot;LINE&quot;]#,#sCurrent[&quot;COLUMN&quot;]#)  
                        #sCurrent[&quot;TEMPLATE&quot;]# 
                 
             

    
    


 
    
    
    
     
    
        
            
            
             
                update PTS_Work set #colname# = 
                    &#039;#value#&#039;
                where workid = #ARGUMENTS.gridrow.workid#
            
        
             
                delete from PTS_Work where workid = #ARGUMENTS.gridrow.workid#
                    
             
        
    
 







INSERT INTO PTS_Work
(
	projectid,
	hours,
	date1,
	workcompleted,
	personnelid
)
VALUES
(
	#URL.ProjectID#,
	,
	,#now()#
	,
	,#pid#
)

	

	







	
	DELETE  FROM PTS_Work
	WHERE
	workid = 
	
	

	






GRID:

&lt;!------&gt;





	select * from IBIS.PTS_Work
    where ProjectID = #URL.ProjectID# and
          PersonnelID = #PID# 



	select Short_Title from IBIS.PTS_Project
    where ProjectID = #URL.ProjectID# 



   


&lt;!--- The form is used to input work completed on a IB Project.--&gt;










   
   
 
   
   
   


   
   
   







#WorkMode# Work Item




// create a new JS proxy object for the CFC	
var dataproxy = new cfcproxy();
dataproxy.setCallbackHandler(handleResult);

// this function recieves the response from CFC whenever a CFC function is called.
// we are simply alerting the response but we could do more if we had to. 
function handleResult(response)
{
	alert(response);
}

// the init()
function init(){
 grid = ColdFusion.Grid.getGridObject(&quot;Work_Grid&quot;);
 
 // get the header and fotoer objects
 var gridHead = grid.getView().getHeaderPanel(true);
 var tbar = new Ext.Toolbar(gridHead);
 var gridFoot = grid.getView().getFooterPanel(true);
 var ds = grid.getDataSource();
 
 // add the 2 custom buttons to the toolbar
 tbar.addButton({text:&quot;Add Work Item&quot;, handler:onAdd });
 tbar.addSeparator();
 tbar.addButton({ text:&quot;Delete Work Item&quot;, handler:onDelete });
 
 // add a row double click event for the grid rows.
 // the double click will open a popup window for editing the row.
 var sm = grid.getSelectionModel();
 grid.on(&#039;rowdblclick&#039;,function(grid, rowIndex, record){
 	var rec = ds.getAt(rowIndex); // get the clicked row
	populateForm(rec); // populate the form with values
 	ColdFusion.Window.show(&#039;addWorkWin&#039;); // display the window
 });
 
  // this shows the display message by default 
 var paging = new Ext.PagingToolbar(gridFoot,ds,{
	  pageSize:10, //number of records displayed in grid
	  displayInfo:true, // change this to false, if you dont want info displayed
	  displayMsg:&#039;Displaying records {0} - {1} of {2}&#039;,
	   emptyMsg:&quot;No records to display&quot;
	   });
	   
// add a custom combobox to the grid header - this combobox lets you choose the number of rows you want to see
 cb = new Ext.form.ComboBox({
   id:&quot;pagingCombo&quot;,
   emptyText:&quot;Rows per page&quot;,
   mode:&quot;local&quot;,
   triggerAction:&quot;all&quot;,
   displayField:&quot;text&quot;,
   valueField:&quot;value&quot;,
         store:new Ext.data.SimpleStore({
            fields: [&quot;value&quot;, &quot;text&quot;],
            data: [
               [&quot;5&quot;,&quot;5 rows per page&quot;],
               [&quot;10&quot;,&quot;10 rows per page&quot;],
               [&quot;15&quot;,&quot;15 rows per page&quot;],
               [&quot;20&quot;,&quot;20 rows per page&quot;]
            ]
   })
});

// add event listener to combobox
// this code will update the grid pageSize 
cb.addListener(&quot;select&quot;,function(combo,record,index){
// the new pageSize from combobox -  it needs to have parseInt() else it starts acting weird
 var numRows = parseInt(record.data.value);
 paging.pageSize = parseInt(numRows);
 paging.onClick(&quot;refresh&quot;);
});

// add the paging combo to right side of the toolbar      
Ext.fly(tbar.addSpacer().getEl().parentNode).setStyle(&#039;width&#039;, &#039;100%&#039;);
tbar.add(cb);	   
	   
}

function populateForm(record){
	// gets the selected row from double click event and populates the form 
	// could also use ColdFusion.getElementValue() here which gets the bound grid row but I find this method better
	
	// the form
	var frm = document.forms[&quot;frmWork&quot;];
	
	// default values if using the &quot;add artist&quot; mode
	var hours = &quot;dummy&quot;;
	var workcompleted = &quot;dummy&quot;;
	var email = &quot;dummy@dummy.com&quot;;
	var address = &quot;dummy&quot;;
	var city = &quot;dummy&quot;;
	var state = &quot;CA&quot;;
	var postalcode=  &quot;754&quot;;
	var artistid = &quot;0&quot;;
	var btntext = &quot;Add Work Item&quot;;
	
	if(record)
	{
		// values for the selected row 
		if(record.data.HOURS.length != 0) hours = record.data.HOURS;
		if(record.data.WORKCOMPLETED.length != 0) workcompleted = record.data.WORKCOMPLETED;
//		if(record.data.EMAIL.length != 0) email = record.data.EMAIL;
//		if(record.data.ADDRESS.length != 0) address = record.data.ADDRESS;
//		if(record.data.CITY.length != 0) city = record.data.CITY;
//		if(record.data.STATE.length != 0) state = record.data.STATE;
//		if(record.data.POSTALCODE.length != 0) postalcode = record.data.POSTALCODE;
//		if(record.data.ARTISTID != &#039;0&#039;) artistid = record.data.ARTISTID; 
//		if(record.data.ARTISTID != &#039;0&#039;) ; btntext = &quot;Update Artist&quot;;
	}
	//populate the form, finally
	frm.hours.value = hours;
 	frm.txtWorkCompleted.value = workcompleted;
//	frm.txtLastName.value = lname;
//	frm.txtEmail.value = email;
//	frm.txtAddress.value = address;
//	frm.txtCity.value = city;
//	frm.txtPostalCode.value= postalcode;
//	frm.txtState.value = state;
//	frm.artistid.value = artistid;   
	frm.btnAction.value = btntext;
}

function onAdd(button,event){
	populateForm(false);
	ColdFusion.Window.show(&#039;addWorkWin&#039;);
}
function onDelete(){
	ColdFusion.Window.show(&#039;deleteWorkWin&#039;);
}

function savework()
{
	//send data to CFC to add artist, the result will be handled by handleResult function above
	var f = document.frmArtist;
	dataproxy.saveArtist(
		 f.artistid.value
		,f.txtFirstName.value
		,f.txtLastName.value
		,f.txtEmail.value
		,f.txtAddress.value
		,f.txtCity.value
		,f.txtState.value
		,f.txtPostalCode.value
	);
	ColdFusion.Grid.refresh(&#039;Work_Grid&#039;, true);	
	ColdFusion.Window.hide(&#039;addWorkWin&#039;);
}

function deleteWork(s)
{
	// if user choose to delete, then send the CFC call, otherwise just sit back!
	if (s == &#039;yes&#039;)
	{
	var grid = ColdFusion.Grid.getGridObject(&quot;Work_Grid&quot;);
	var record = grid.getSelections();
	// remember, CF makes column names to all UPPERCASE, so dont forget to do that
	dataproxy.deleteWork(record[0].data.WORKID);
	}
	ColdFusion.Grid.refresh(&#039;Work_Grid&#039;, true);
	ColdFusion.Window.hide(&#039;deleteWorkWin&#039;);
}





&lt;!-- CSS --&gt;





&lt;!-- Favicon --&gt;




  a:link {text-decoration: underline}
  a:visited {text-decoration: underline}
  a:active {text-decoration: underline}
  a:hover {text-decoration: underline}
  .normal2 {font-size: 9px;}
  a {font-family: Geneva, Arial, Helvetica, sans-serif;}



	#WorkGrid .x-grid-row td {white-space:normal;}

	   



function checkForm(form) {

	 var ok = &quot;yes&quot;;
	
	if ((form.Hours.value == null) &#124;&#124; (form.Hours.value == &quot;&quot;)) {
        alert(&quot;Please enter hours worked on this task.&quot;);
        form.Hours.focus();
        ok = &quot;no&quot;;
	}
    else if (form.Hours.value.length &gt; 10) { 
        alert(&quot;Hours is limited to 10 characters&quot;); 
        form.Hours.focus();
      ok = &quot;no&quot;; 
    } 
    else if ((form.WorkCompl.value == null) &#124;&#124;(form.WorkCompl.value == &quot;&quot;)) {
        alert(&quot;Please enter a description of the work completed for this project.&quot;);
        form.WorkCompl.focus();
        ok = &quot;no&quot;;
	}
    else if (form.WorkCompl.value.length &gt; 500) { 
        alert(&quot;Description of work completed is limited to 500 characters&quot;); 
        form.WorkCompl.focus();
      ok = &quot;no&quot;; 
    } 
	
    if (ok == &quot;no&quot;) {
		return false;
    }
	else {
		return true;
	}
}

function init(){
	//get the grid component
	grid=ColdFusion.Grid.getGridObject(&quot;work_grid&quot;);
}







  
    
  



  
    &#160;
    
  
    Work Performed - #FormTitle#
  




    
       
       
       
          
             Hours: *
             
          
        
      
      
       
          
            Work Completed: *
            
            #WorkCompl#
            
          
        
      
          
      
            
            
         
         &#160;&#160;
         
       

    
    


&lt;!---	
    
    
    
    
    
    
    
     ---&gt;


    

       
          
          
          
          
          
          
       
&lt;!---       
       
---&gt;
    

    
        
        Please Confirm this action.
        
        
        
        
    
    
    
        
            
                
                    Hours:
                    
                
                
                    Work Completed:
                                #WorkCompl#
                    
                
                
                    
                
             
             
        
    


    


    

</description>
		<content:encoded><![CDATA[<p>UPDATE on CODE:</p>
<p>Somehow my copy/paste skills went awry!!!  Here is my code:</p>
<p>CFC:</p>
<p>		SELECT *<br />
		FROM PTS_Work<br />
        WHERE PersonnelID = #PID# AND<br />
              ProjectID = #URL.PROJECTID#</p>
<p>            order by #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdirection#</p>
<p>&lt;!&#8212;	  &#8212;&gt;    </p>
<p>	          <!--- the message to display --><br />
            You&#8217;ve Thrown a Database <b>Error</b> </p>
<p>                <!--- and the diagnostic message from the ColdFusion server --><br />
                #cfcatch.message#<br />
                Caught an exception, type = #CFCATCH.TYPE#<br />
                The contents of the tag stack are: </p>
<p>                    #i# #sCurrent["ID"]#<br />
                        (#sCurrent["LINE"]#,#sCurrent["COLUMN"]#)<br />
                        #sCurrent["TEMPLATE"]# </p>
<p>                update PTS_Work set #colname# =<br />
                    &#8216;#value#&#8217;<br />
                where workid = #ARGUMENTS.gridrow.workid#</p>
<p>                delete from PTS_Work where workid = #ARGUMENTS.gridrow.workid#</p>
<p>INSERT INTO PTS_Work<br />
(<br />
	projectid,<br />
	hours,<br />
	date1,<br />
	workcompleted,<br />
	personnelid<br />
)<br />
VALUES<br />
(<br />
	#URL.ProjectID#,<br />
	,<br />
	,#now()#<br />
	,<br />
	,#pid#<br />
)</p>
<p>	DELETE  FROM PTS_Work<br />
	WHERE<br />
	workid = </p>
<p>GRID:</p>
<p>&lt;!&#8212;&#8212;&gt;</p>
<p>	select * from IBIS.PTS_Work<br />
    where ProjectID = #URL.ProjectID# and<br />
          PersonnelID = #PID# </p>
<p>	select Short_Title from IBIS.PTS_Project<br />
    where ProjectID = #URL.ProjectID# </p>
<p><!--- The form is used to input work completed on a IB Project.--></p>
<p>#WorkMode# Work Item</p>
<p>// create a new JS proxy object for the CFC<br />
var dataproxy = new cfcproxy();<br />
dataproxy.setCallbackHandler(handleResult);</p>
<p>// this function recieves the response from CFC whenever a CFC function is called.<br />
// we are simply alerting the response but we could do more if we had to.<br />
function handleResult(response)<br />
{<br />
	alert(response);<br />
}</p>
<p>// the init()<br />
function init(){<br />
 grid = ColdFusion.Grid.getGridObject(&#8220;Work_Grid&#8221;);</p>
<p> // get the header and fotoer objects<br />
 var gridHead = grid.getView().getHeaderPanel(true);<br />
 var tbar = new Ext.Toolbar(gridHead);<br />
 var gridFoot = grid.getView().getFooterPanel(true);<br />
 var ds = grid.getDataSource();</p>
<p> // add the 2 custom buttons to the toolbar<br />
 tbar.addButton({text:&#8221;Add Work Item&#8221;, handler:onAdd });<br />
 tbar.addSeparator();<br />
 tbar.addButton({ text:&#8221;Delete Work Item&#8221;, handler:onDelete });</p>
<p> // add a row double click event for the grid rows.<br />
 // the double click will open a popup window for editing the row.<br />
 var sm = grid.getSelectionModel();<br />
 grid.on(&#8216;rowdblclick&#8217;,function(grid, rowIndex, record){<br />
 	var rec = ds.getAt(rowIndex); // get the clicked row<br />
	populateForm(rec); // populate the form with values<br />
 	ColdFusion.Window.show(&#8216;addWorkWin&#8217;); // display the window<br />
 });</p>
<p>  // this shows the display message by default<br />
 var paging = new Ext.PagingToolbar(gridFoot,ds,{<br />
	  pageSize:10, //number of records displayed in grid<br />
	  displayInfo:true, // change this to false, if you dont want info displayed<br />
	  displayMsg:&#8217;Displaying records {0} &#8211; {1} of {2}&#8217;,<br />
	   emptyMsg:&#8221;No records to display&#8221;<br />
	   });</p>
<p>// add a custom combobox to the grid header &#8211; this combobox lets you choose the number of rows you want to see<br />
 cb = new Ext.form.ComboBox({<br />
   id:&#8221;pagingCombo&#8221;,<br />
   emptyText:&#8221;Rows per page&#8221;,<br />
   mode:&#8221;local&#8221;,<br />
   triggerAction:&#8221;all&#8221;,<br />
   displayField:&#8221;text&#8221;,<br />
   valueField:&#8221;value&#8221;,<br />
         store:new Ext.data.SimpleStore({<br />
            fields: ["value", "text"],<br />
            data: [<br />
               ["5","5 rows per page"],<br />
               ["10","10 rows per page"],<br />
               ["15","15 rows per page"],<br />
               ["20","20 rows per page"]<br />
            ]<br />
   })<br />
});</p>
<p>// add event listener to combobox<br />
// this code will update the grid pageSize<br />
cb.addListener(&#8220;select&#8221;,function(combo,record,index){<br />
// the new pageSize from combobox &#8211;  it needs to have parseInt() else it starts acting weird<br />
 var numRows = parseInt(record.data.value);<br />
 paging.pageSize = parseInt(numRows);<br />
 paging.onClick(&#8220;refresh&#8221;);<br />
});</p>
<p>// add the paging combo to right side of the toolbar<br />
Ext.fly(tbar.addSpacer().getEl().parentNode).setStyle(&#8216;width&#8217;, &#8217;100%&#8217;);<br />
tbar.add(cb);	   </p>
<p>}</p>
<p>function populateForm(record){<br />
	// gets the selected row from double click event and populates the form<br />
	// could also use ColdFusion.getElementValue() here which gets the bound grid row but I find this method better</p>
<p>	// the form<br />
	var frm = document.forms["frmWork"];</p>
<p>	// default values if using the &#8220;add artist&#8221; mode<br />
	var hours = &#8220;dummy&#8221;;<br />
	var workcompleted = &#8220;dummy&#8221;;<br />
	var email = &#8220;dummy@dummy.com&#8221;;<br />
	var address = &#8220;dummy&#8221;;<br />
	var city = &#8220;dummy&#8221;;<br />
	var state = &#8220;CA&#8221;;<br />
	var postalcode=  &#8220;754&#8243;;<br />
	var artistid = &#8220;0&#8243;;<br />
	var btntext = &#8220;Add Work Item&#8221;;</p>
<p>	if(record)<br />
	{<br />
		// values for the selected row<br />
		if(record.data.HOURS.length != 0) hours = record.data.HOURS;<br />
		if(record.data.WORKCOMPLETED.length != 0) workcompleted = record.data.WORKCOMPLETED;<br />
//		if(record.data.EMAIL.length != 0) email = record.data.EMAIL;<br />
//		if(record.data.ADDRESS.length != 0) address = record.data.ADDRESS;<br />
//		if(record.data.CITY.length != 0) city = record.data.CITY;<br />
//		if(record.data.STATE.length != 0) state = record.data.STATE;<br />
//		if(record.data.POSTALCODE.length != 0) postalcode = record.data.POSTALCODE;<br />
//		if(record.data.ARTISTID != &#8217;0&#8242;) artistid = record.data.ARTISTID;<br />
//		if(record.data.ARTISTID != &#8217;0&#8242;) ; btntext = &#8220;Update Artist&#8221;;<br />
	}<br />
	//populate the form, finally<br />
	frm.hours.value = hours;<br />
 	frm.txtWorkCompleted.value = workcompleted;<br />
//	frm.txtLastName.value = lname;<br />
//	frm.txtEmail.value = email;<br />
//	frm.txtAddress.value = address;<br />
//	frm.txtCity.value = city;<br />
//	frm.txtPostalCode.value= postalcode;<br />
//	frm.txtState.value = state;<br />
//	frm.artistid.value = artistid;<br />
	frm.btnAction.value = btntext;<br />
}</p>
<p>function onAdd(button,event){<br />
	populateForm(false);<br />
	ColdFusion.Window.show(&#8216;addWorkWin&#8217;);<br />
}<br />
function onDelete(){<br />
	ColdFusion.Window.show(&#8216;deleteWorkWin&#8217;);<br />
}</p>
<p>function savework()<br />
{<br />
	//send data to CFC to add artist, the result will be handled by handleResult function above<br />
	var f = document.frmArtist;<br />
	dataproxy.saveArtist(<br />
		 f.artistid.value<br />
		,f.txtFirstName.value<br />
		,f.txtLastName.value<br />
		,f.txtEmail.value<br />
		,f.txtAddress.value<br />
		,f.txtCity.value<br />
		,f.txtState.value<br />
		,f.txtPostalCode.value<br />
	);<br />
	ColdFusion.Grid.refresh(&#8216;Work_Grid&#8217;, true);<br />
	ColdFusion.Window.hide(&#8216;addWorkWin&#8217;);<br />
}</p>
<p>function deleteWork(s)<br />
{<br />
	// if user choose to delete, then send the CFC call, otherwise just sit back!<br />
	if (s == &#8216;yes&#8217;)<br />
	{<br />
	var grid = ColdFusion.Grid.getGridObject(&#8220;Work_Grid&#8221;);<br />
	var record = grid.getSelections();<br />
	// remember, CF makes column names to all UPPERCASE, so dont forget to do that<br />
	dataproxy.deleteWork(record[0].data.WORKID);<br />
	}<br />
	ColdFusion.Grid.refresh(&#8216;Work_Grid&#8217;, true);<br />
	ColdFusion.Window.hide(&#8216;deleteWorkWin&#8217;);<br />
}</p>
<p><!-- CSS --></p>
<p><!-- Favicon --></p>
<p>  a:link {text-decoration: underline}<br />
  a:visited {text-decoration: underline}<br />
  a:active {text-decoration: underline}<br />
  a:hover {text-decoration: underline}<br />
  .normal2 {font-size: 9px;}<br />
  a {font-family: Geneva, Arial, Helvetica, sans-serif;}</p>
<p>	#WorkGrid .x-grid-row td {white-space:normal;}</p>
<p>function checkForm(form) {</p>
<p>	 var ok = &#8220;yes&#8221;;</p>
<p>	if ((form.Hours.value == null) || (form.Hours.value == &#8220;&#8221;)) {<br />
        alert(&#8220;Please enter hours worked on this task.&#8221;);<br />
        form.Hours.focus();<br />
        ok = &#8220;no&#8221;;<br />
	}<br />
    else if (form.Hours.value.length &gt; 10) {<br />
        alert(&#8220;Hours is limited to 10 characters&#8221;);<br />
        form.Hours.focus();<br />
      ok = &#8220;no&#8221;;<br />
    }<br />
    else if ((form.WorkCompl.value == null) ||(form.WorkCompl.value == &#8220;&#8221;)) {<br />
        alert(&#8220;Please enter a description of the work completed for this project.&#8221;);<br />
        form.WorkCompl.focus();<br />
        ok = &#8220;no&#8221;;<br />
	}<br />
    else if (form.WorkCompl.value.length &gt; 500) {<br />
        alert(&#8220;Description of work completed is limited to 500 characters&#8221;);<br />
        form.WorkCompl.focus();<br />
      ok = &#8220;no&#8221;;<br />
    } </p>
<p>    if (ok == &#8220;no&#8221;) {<br />
		return false;<br />
    }<br />
	else {<br />
		return true;<br />
	}<br />
}</p>
<p>function init(){<br />
	//get the grid component<br />
	grid=ColdFusion.Grid.getGridObject(&#8220;work_grid&#8221;);<br />
}</p>
<p>    &nbsp;</p>
<p>    Work Performed &#8211; #FormTitle#</p>
<p>             Hours: *</p>
<p>            Work Completed: *</p>
<p>            #WorkCompl#</p>
<p>         &nbsp;&nbsp;</p>
<p>&lt;!&#8212;	</p>
<p>     &#8212;&gt;</p>
<p>&lt;!&#8212;       </p>
<p>&#8212;&gt;</p>
<p>        Please Confirm this action.</p>
<p>                    Hours:</p>
<p>                    Work Completed:<br />
                                #WorkCompl#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wendy</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-18896</link>
		<dc:creator>Wendy</dc:creator>
		<pubDate>Wed, 11 Jan 2012 19:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-18896</guid>
		<description>Cannot get the grid to bind (display).  Any ideas?  I am getting no output even just returning a string from the function.  

CFC:




   
   
   
   

   
      
      
   
   
	
		SELECT *
		FROM PTS_Work
        WHERE PersonnelID = #PID# AND
              ProjectID = #URL.PROJECTID#
	 
            order by #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdirection#
         
	

    
    
&lt;!---	  ---&gt;    
    
    
	          &lt;!--- the message to display --&gt; 
            You&#039;ve Thrown a Database &lt;b&gt;Error&lt;/b&gt; 
             
                &lt;!--- and the diagnostic message from the ColdFusion server --&gt; 
                #cfcatch.message# 
                Caught an exception, type = #CFCATCH.TYPE#  
                The contents of the tag stack are: 
                 
                     
                    #i# #sCurrent[&quot;ID&quot;]#  
                        (#sCurrent[&quot;LINE&quot;]#,#sCurrent[&quot;COLUMN&quot;]#)  
                        #sCurrent[&quot;TEMPLATE&quot;]# 
                 
             

    
    


 
    
    
    
     
    
        
            
            
             
                update PTS_Work set #colname# = 
                    &#039;#value#&#039;
                where workid = #ARGUMENTS.gridrow.workid#
            
        
             
                delete from PTS_Work where workid = #ARGUMENTS.gridrow.workid#
                    
             
        
    
 







INSERT INTO PTS_Work
(
	projectid,
	hours,
	date1,
	workcompleted,
	personnelid
)
VALUES
(
	#URL.ProjectID#,
	,
	,#now()#
	,
	,#pid#
)

	

	







	
	DELETE  FROM PTS_Work
	WHERE
	workid = 
	
	

	






CFGRID:

!------&gt;





	select * from IBIS.PTS_Work
    where ProjectID = #URL.ProjectID# and
          PersonnelID = #PID# 



	select Short_Title from IBIS.PTS_Project
    where ProjectID = #URL.ProjectID# 



   


&lt;!--- The form is used to input work completed on a IB Project.--&gt;










   
   
 
   
   
   


   
   
   







#WorkMode# Work Item




// create a new JS proxy object for the CFC	
var dataproxy = new cfcproxy();
dataproxy.setCallbackHandler(handleResult);

// this function recieves the response from CFC whenever a CFC function is called.
// we are simply alerting the response but we could do more if we had to. 
function handleResult(response)
{
	alert(response);
}

// the init()
function init(){
 grid = ColdFusion.Grid.getGridObject(&quot;Work_Grid&quot;);
 
 // get the header and fotoer objects
 var gridHead = grid.getView().getHeaderPanel(true);
 var tbar = new Ext.Toolbar(gridHead);
 var gridFoot = grid.getView().getFooterPanel(true);
 var ds = grid.getDataSource();
 
 // add the 2 custom buttons to the toolbar
 tbar.addButton({text:&quot;Add Work Item&quot;, handler:onAdd });
 tbar.addSeparator();
 tbar.addButton({ text:&quot;Delete Work Item&quot;, handler:onDelete });
 
 // add a row double click event for the grid rows.
 // the double click will open a popup window for editing the row.
 var sm = grid.getSelectionModel();
 grid.on(&#039;rowdblclick&#039;,function(grid, rowIndex, record){
 	var rec = ds.getAt(rowIndex); // get the clicked row
	populateForm(rec); // populate the form with values
 	ColdFusion.Window.show(&#039;addWorkWin&#039;); // display the window
 });
 
  // this shows the display message by default 
 var paging = new Ext.PagingToolbar(gridFoot,ds,{
	  pageSize:10, //number of records displayed in grid
	  displayInfo:true, // change this to false, if you dont want info displayed
	  displayMsg:&#039;Displaying records {0} - {1} of {2}&#039;,
	   emptyMsg:&quot;No records to display&quot;
	   });
	   
// add a custom combobox to the grid header - this combobox lets you choose the number of rows you want to see
 cb = new Ext.form.ComboBox({
   id:&quot;pagingCombo&quot;,
   emptyText:&quot;Rows per page&quot;,
   mode:&quot;local&quot;,
   triggerAction:&quot;all&quot;,
   displayField:&quot;text&quot;,
   valueField:&quot;value&quot;,
         store:new Ext.data.SimpleStore({
            fields: [&quot;value&quot;, &quot;text&quot;],
            data: [
               [&quot;5&quot;,&quot;5 rows per page&quot;],
               [&quot;10&quot;,&quot;10 rows per page&quot;],
               [&quot;15&quot;,&quot;15 rows per page&quot;],
               [&quot;20&quot;,&quot;20 rows per page&quot;]
            ]
   })
});

// add event listener to combobox
// this code will update the grid pageSize 
cb.addListener(&quot;select&quot;,function(combo,record,index){
// the new pageSize from combobox -  it needs to have parseInt() else it starts acting weird
 var numRows = parseInt(record.data.value);
 paging.pageSize = parseInt(numRows);
 paging.onClick(&quot;refresh&quot;);
});

// add the paging combo to right side of the toolbar      
Ext.fly(tbar.addSpacer().getEl().parentNode).setStyle(&#039;width&#039;, &#039;100%&#039;);
tbar.add(cb);	   
	   
}

function populateForm(record){
	// gets the selected row from double click event and populates the form 
	// could also use ColdFusion.getElementValue() here which gets the bound grid row but I find this method better
	
	// the form
	var frm = document.forms[&quot;frmWork&quot;];
	
	// default values if using the &quot;add artist&quot; mode
	var hours = &quot;dummy&quot;;
	var workcompleted = &quot;dummy&quot;;
	var email = &quot;dummy@dummy.com&quot;;
	var address = &quot;dummy&quot;;
	var city = &quot;dummy&quot;;
	var state = &quot;CA&quot;;
	var postalcode=  &quot;754&quot;;
	var artistid = &quot;0&quot;;
	var btntext = &quot;Add Work Item&quot;;
	
	if(record)
	{
		// values for the selected row 
		if(record.data.HOURS.length != 0) hours = record.data.HOURS;
		if(record.data.WORKCOMPLETED.length != 0) workcompleted = record.data.WORKCOMPLETED;
//		if(record.data.EMAIL.length != 0) email = record.data.EMAIL;
//		if(record.data.ADDRESS.length != 0) address = record.data.ADDRESS;
//		if(record.data.CITY.length != 0) city = record.data.CITY;
//		if(record.data.STATE.length != 0) state = record.data.STATE;
//		if(record.data.POSTALCODE.length != 0) postalcode = record.data.POSTALCODE;
//		if(record.data.ARTISTID != &#039;0&#039;) artistid = record.data.ARTISTID; 
//		if(record.data.ARTISTID != &#039;0&#039;) ; btntext = &quot;Update Artist&quot;;
	}
	//populate the form, finally
	frm.hours.value = hours;
 	frm.txtWorkCompleted.value = workcompleted;
//	frm.txtLastName.value = lname;
//	frm.txtEmail.value = email;
//	frm.txtAddress.value = address;
//	frm.txtCity.value = city;
//	frm.txtPostalCode.value= postalcode;
//	frm.txtState.value = state;
//	frm.artistid.value = artistid;   
	frm.btnAction.value = btntext;
}

function onAdd(button,event){
	populateForm(false);
	ColdFusion.Window.show(&#039;addWorkWin&#039;);
}
function onDelete(){
	ColdFusion.Window.show(&#039;deleteWorkWin&#039;);
}

function savework()
{
	//send data to CFC to add artist, the result will be handled by handleResult function above
	var f = document.frmArtist;
	dataproxy.saveArtist(
		 f.artistid.value
		,f.txtFirstName.value
		,f.txtLastName.value
		,f.txtEmail.value
		,f.txtAddress.value
		,f.txtCity.value
		,f.txtState.value
		,f.txtPostalCode.value
	);
	ColdFusion.Grid.refresh(&#039;Work_Grid&#039;, true);	
	ColdFusion.Window.hide(&#039;addWorkWin&#039;);
}

function deleteWork(s)
{
	// if user choose to delete, then send the CFC call, otherwise just sit back!
	if (s == &#039;yes&#039;)
	{
	var grid = ColdFusion.Grid.getGridObject(&quot;Work_Grid&quot;);
	var record = grid.getSelections();
	// remember, CF makes column names to all UPPERCASE, so dont forget to do that
	dataproxy.deleteWork(record[0].data.WORKID);
	}
	ColdFusion.Grid.refresh(&#039;Work_Grid&#039;, true);
	ColdFusion.Window.hide(&#039;deleteWorkWin&#039;);
}





&lt;!-- CSS --&gt;





&lt;!-- Favicon --&gt;




  a:link {text-decoration: underline}
  a:visited {text-decoration: underline}
  a:active {text-decoration: underline}
  a:hover {text-decoration: underline}
  .normal2 {font-size: 9px;}
  a {font-family: Geneva, Arial, Helvetica, sans-serif;}



	#WorkGrid .x-grid-row td {white-space:normal;}

	   



function checkForm(form) {

	 var ok = &quot;yes&quot;;
	
	if ((form.Hours.value == null) &#124;&#124; (form.Hours.value == &quot;&quot;)) {
        alert(&quot;Please enter hours worked on this task.&quot;);
        form.Hours.focus();
        ok = &quot;no&quot;;
	}
    else if (form.Hours.value.length &gt; 10) { 
        alert(&quot;Hours is limited to 10 characters&quot;); 
        form.Hours.focus();
      ok = &quot;no&quot;; 
    } 
    else if ((form.WorkCompl.value == null) &#124;&#124;(form.WorkCompl.value == &quot;&quot;)) {
        alert(&quot;Please enter a description of the work completed for this project.&quot;);
        form.WorkCompl.focus();
        ok = &quot;no&quot;;
	}
    else if (form.WorkCompl.value.length &gt; 500) { 
        alert(&quot;Description of work completed is limited to 500 characters&quot;); 
        form.WorkCompl.focus();
      ok = &quot;no&quot;; 
    } 
	
    if (ok == &quot;no&quot;) {
		return false;
    }
	else {
		return true;
	}
}

function init(){
	//get the grid component
	grid=ColdFusion.Grid.getGridObject(&quot;work_grid&quot;);
}







  
    
  



  
    &#160;
    
  
    Work Performed - #FormTitle#
  




    
       
       
       
          
             Hours: *
             
          
        
      
      
       
          
            Work Completed: *
            
            #WorkCompl#
            
          
        
      
          
      
            
            
         
         &#160;&#160;
         
       

    
    


&lt;!---	
    
    
    
    
    
    
    
     ---&gt;


    

       
          
          
          
          
          
          
       
&lt;!---       
       
---&gt;
    

    
        
        Please Confirm this action.
        
        
        
        
    
    
    
        
            
                
                    Hours:
                    
                
                
                    Work Completed:
                                #WorkCompl#
                    
                
                
                    
                
             
             
        
    


    


    


</description>
		<content:encoded><![CDATA[<p>Cannot get the grid to bind (display).  Any ideas?  I am getting no output even just returning a string from the function.  </p>
<p>CFC:</p>
<p>		SELECT *<br />
		FROM PTS_Work<br />
        WHERE PersonnelID = #PID# AND<br />
              ProjectID = #URL.PROJECTID#</p>
<p>            order by #ARGUMENTS.gridsortcolumn# #ARGUMENTS.gridsortdirection#</p>
<p>&lt;!&#8212;	  &#8212;&gt;    </p>
<p>	          <!--- the message to display --><br />
            You&#8217;ve Thrown a Database <b>Error</b> </p>
<p>                <!--- and the diagnostic message from the ColdFusion server --><br />
                #cfcatch.message#<br />
                Caught an exception, type = #CFCATCH.TYPE#<br />
                The contents of the tag stack are: </p>
<p>                    #i# #sCurrent["ID"]#<br />
                        (#sCurrent["LINE"]#,#sCurrent["COLUMN"]#)<br />
                        #sCurrent["TEMPLATE"]# </p>
<p>                update PTS_Work set #colname# =<br />
                    &#8216;#value#&#8217;<br />
                where workid = #ARGUMENTS.gridrow.workid#</p>
<p>                delete from PTS_Work where workid = #ARGUMENTS.gridrow.workid#</p>
<p>INSERT INTO PTS_Work<br />
(<br />
	projectid,<br />
	hours,<br />
	date1,<br />
	workcompleted,<br />
	personnelid<br />
)<br />
VALUES<br />
(<br />
	#URL.ProjectID#,<br />
	,<br />
	,#now()#<br />
	,<br />
	,#pid#<br />
)</p>
<p>	DELETE  FROM PTS_Work<br />
	WHERE<br />
	workid = </p>
<p>CFGRID:</p>
<p>!&#8212;&#8212;&gt;</p>
<p>	select * from IBIS.PTS_Work<br />
    where ProjectID = #URL.ProjectID# and<br />
          PersonnelID = #PID# </p>
<p>	select Short_Title from IBIS.PTS_Project<br />
    where ProjectID = #URL.ProjectID# </p>
<p><!--- The form is used to input work completed on a IB Project.--></p>
<p>#WorkMode# Work Item</p>
<p>// create a new JS proxy object for the CFC<br />
var dataproxy = new cfcproxy();<br />
dataproxy.setCallbackHandler(handleResult);</p>
<p>// this function recieves the response from CFC whenever a CFC function is called.<br />
// we are simply alerting the response but we could do more if we had to.<br />
function handleResult(response)<br />
{<br />
	alert(response);<br />
}</p>
<p>// the init()<br />
function init(){<br />
 grid = ColdFusion.Grid.getGridObject(&#8220;Work_Grid&#8221;);</p>
<p> // get the header and fotoer objects<br />
 var gridHead = grid.getView().getHeaderPanel(true);<br />
 var tbar = new Ext.Toolbar(gridHead);<br />
 var gridFoot = grid.getView().getFooterPanel(true);<br />
 var ds = grid.getDataSource();</p>
<p> // add the 2 custom buttons to the toolbar<br />
 tbar.addButton({text:&#8221;Add Work Item&#8221;, handler:onAdd });<br />
 tbar.addSeparator();<br />
 tbar.addButton({ text:&#8221;Delete Work Item&#8221;, handler:onDelete });</p>
<p> // add a row double click event for the grid rows.<br />
 // the double click will open a popup window for editing the row.<br />
 var sm = grid.getSelectionModel();<br />
 grid.on(&#8216;rowdblclick&#8217;,function(grid, rowIndex, record){<br />
 	var rec = ds.getAt(rowIndex); // get the clicked row<br />
	populateForm(rec); // populate the form with values<br />
 	ColdFusion.Window.show(&#8216;addWorkWin&#8217;); // display the window<br />
 });</p>
<p>  // this shows the display message by default<br />
 var paging = new Ext.PagingToolbar(gridFoot,ds,{<br />
	  pageSize:10, //number of records displayed in grid<br />
	  displayInfo:true, // change this to false, if you dont want info displayed<br />
	  displayMsg:&#8217;Displaying records {0} &#8211; {1} of {2}&#8217;,<br />
	   emptyMsg:&#8221;No records to display&#8221;<br />
	   });</p>
<p>// add a custom combobox to the grid header &#8211; this combobox lets you choose the number of rows you want to see<br />
 cb = new Ext.form.ComboBox({<br />
   id:&#8221;pagingCombo&#8221;,<br />
   emptyText:&#8221;Rows per page&#8221;,<br />
   mode:&#8221;local&#8221;,<br />
   triggerAction:&#8221;all&#8221;,<br />
   displayField:&#8221;text&#8221;,<br />
   valueField:&#8221;value&#8221;,<br />
         store:new Ext.data.SimpleStore({<br />
            fields: ["value", "text"],<br />
            data: [<br />
               ["5","5 rows per page"],<br />
               ["10","10 rows per page"],<br />
               ["15","15 rows per page"],<br />
               ["20","20 rows per page"]<br />
            ]<br />
   })<br />
});</p>
<p>// add event listener to combobox<br />
// this code will update the grid pageSize<br />
cb.addListener(&#8220;select&#8221;,function(combo,record,index){<br />
// the new pageSize from combobox &#8211;  it needs to have parseInt() else it starts acting weird<br />
 var numRows = parseInt(record.data.value);<br />
 paging.pageSize = parseInt(numRows);<br />
 paging.onClick(&#8220;refresh&#8221;);<br />
});</p>
<p>// add the paging combo to right side of the toolbar<br />
Ext.fly(tbar.addSpacer().getEl().parentNode).setStyle(&#8216;width&#8217;, &#8217;100%&#8217;);<br />
tbar.add(cb);	   </p>
<p>}</p>
<p>function populateForm(record){<br />
	// gets the selected row from double click event and populates the form<br />
	// could also use ColdFusion.getElementValue() here which gets the bound grid row but I find this method better</p>
<p>	// the form<br />
	var frm = document.forms["frmWork"];</p>
<p>	// default values if using the &#8220;add artist&#8221; mode<br />
	var hours = &#8220;dummy&#8221;;<br />
	var workcompleted = &#8220;dummy&#8221;;<br />
	var email = &#8220;dummy@dummy.com&#8221;;<br />
	var address = &#8220;dummy&#8221;;<br />
	var city = &#8220;dummy&#8221;;<br />
	var state = &#8220;CA&#8221;;<br />
	var postalcode=  &#8220;754&#8243;;<br />
	var artistid = &#8220;0&#8243;;<br />
	var btntext = &#8220;Add Work Item&#8221;;</p>
<p>	if(record)<br />
	{<br />
		// values for the selected row<br />
		if(record.data.HOURS.length != 0) hours = record.data.HOURS;<br />
		if(record.data.WORKCOMPLETED.length != 0) workcompleted = record.data.WORKCOMPLETED;<br />
//		if(record.data.EMAIL.length != 0) email = record.data.EMAIL;<br />
//		if(record.data.ADDRESS.length != 0) address = record.data.ADDRESS;<br />
//		if(record.data.CITY.length != 0) city = record.data.CITY;<br />
//		if(record.data.STATE.length != 0) state = record.data.STATE;<br />
//		if(record.data.POSTALCODE.length != 0) postalcode = record.data.POSTALCODE;<br />
//		if(record.data.ARTISTID != &#8217;0&#8242;) artistid = record.data.ARTISTID;<br />
//		if(record.data.ARTISTID != &#8217;0&#8242;) ; btntext = &#8220;Update Artist&#8221;;<br />
	}<br />
	//populate the form, finally<br />
	frm.hours.value = hours;<br />
 	frm.txtWorkCompleted.value = workcompleted;<br />
//	frm.txtLastName.value = lname;<br />
//	frm.txtEmail.value = email;<br />
//	frm.txtAddress.value = address;<br />
//	frm.txtCity.value = city;<br />
//	frm.txtPostalCode.value= postalcode;<br />
//	frm.txtState.value = state;<br />
//	frm.artistid.value = artistid;<br />
	frm.btnAction.value = btntext;<br />
}</p>
<p>function onAdd(button,event){<br />
	populateForm(false);<br />
	ColdFusion.Window.show(&#8216;addWorkWin&#8217;);<br />
}<br />
function onDelete(){<br />
	ColdFusion.Window.show(&#8216;deleteWorkWin&#8217;);<br />
}</p>
<p>function savework()<br />
{<br />
	//send data to CFC to add artist, the result will be handled by handleResult function above<br />
	var f = document.frmArtist;<br />
	dataproxy.saveArtist(<br />
		 f.artistid.value<br />
		,f.txtFirstName.value<br />
		,f.txtLastName.value<br />
		,f.txtEmail.value<br />
		,f.txtAddress.value<br />
		,f.txtCity.value<br />
		,f.txtState.value<br />
		,f.txtPostalCode.value<br />
	);<br />
	ColdFusion.Grid.refresh(&#8216;Work_Grid&#8217;, true);<br />
	ColdFusion.Window.hide(&#8216;addWorkWin&#8217;);<br />
}</p>
<p>function deleteWork(s)<br />
{<br />
	// if user choose to delete, then send the CFC call, otherwise just sit back!<br />
	if (s == &#8216;yes&#8217;)<br />
	{<br />
	var grid = ColdFusion.Grid.getGridObject(&#8220;Work_Grid&#8221;);<br />
	var record = grid.getSelections();<br />
	// remember, CF makes column names to all UPPERCASE, so dont forget to do that<br />
	dataproxy.deleteWork(record[0].data.WORKID);<br />
	}<br />
	ColdFusion.Grid.refresh(&#8216;Work_Grid&#8217;, true);<br />
	ColdFusion.Window.hide(&#8216;deleteWorkWin&#8217;);<br />
}</p>
<p><!-- CSS --></p>
<p><!-- Favicon --></p>
<p>  a:link {text-decoration: underline}<br />
  a:visited {text-decoration: underline}<br />
  a:active {text-decoration: underline}<br />
  a:hover {text-decoration: underline}<br />
  .normal2 {font-size: 9px;}<br />
  a {font-family: Geneva, Arial, Helvetica, sans-serif;}</p>
<p>	#WorkGrid .x-grid-row td {white-space:normal;}</p>
<p>function checkForm(form) {</p>
<p>	 var ok = &#8220;yes&#8221;;</p>
<p>	if ((form.Hours.value == null) || (form.Hours.value == &#8220;&#8221;)) {<br />
        alert(&#8220;Please enter hours worked on this task.&#8221;);<br />
        form.Hours.focus();<br />
        ok = &#8220;no&#8221;;<br />
	}<br />
    else if (form.Hours.value.length &gt; 10) {<br />
        alert(&#8220;Hours is limited to 10 characters&#8221;);<br />
        form.Hours.focus();<br />
      ok = &#8220;no&#8221;;<br />
    }<br />
    else if ((form.WorkCompl.value == null) ||(form.WorkCompl.value == &#8220;&#8221;)) {<br />
        alert(&#8220;Please enter a description of the work completed for this project.&#8221;);<br />
        form.WorkCompl.focus();<br />
        ok = &#8220;no&#8221;;<br />
	}<br />
    else if (form.WorkCompl.value.length &gt; 500) {<br />
        alert(&#8220;Description of work completed is limited to 500 characters&#8221;);<br />
        form.WorkCompl.focus();<br />
      ok = &#8220;no&#8221;;<br />
    } </p>
<p>    if (ok == &#8220;no&#8221;) {<br />
		return false;<br />
    }<br />
	else {<br />
		return true;<br />
	}<br />
}</p>
<p>function init(){<br />
	//get the grid component<br />
	grid=ColdFusion.Grid.getGridObject(&#8220;work_grid&#8221;);<br />
}</p>
<p>    &nbsp;</p>
<p>    Work Performed &#8211; #FormTitle#</p>
<p>             Hours: *</p>
<p>            Work Completed: *</p>
<p>            #WorkCompl#</p>
<p>         &nbsp;&nbsp;</p>
<p>&lt;!&#8212;	</p>
<p>     &#8212;&gt;</p>
<p>&lt;!&#8212;       </p>
<p>&#8212;&gt;</p>
<p>        Please Confirm this action.</p>
<p>                    Hours:</p>
<p>                    Work Completed:<br />
                                #WorkCompl#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shelly B Martinson</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-17255</link>
		<dc:creator>Shelly B Martinson</dc:creator>
		<pubDate>Sat, 31 Dec 2011 21:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-17255</guid>
		<description>I am having the same problem that Fabio B. is having I think.  I also cannot sort for some reason.  

I am getting a good query but it is not returning a good json.  Then the sorting gets all messed up and I don&#039;t know what to do.  How can I fix this?

Thanks
Shelly</description>
		<content:encoded><![CDATA[<p>I am having the same problem that Fabio B. is having I think.  I also cannot sort for some reason.  </p>
<p>I am getting a good query but it is not returning a good json.  Then the sorting gets all messed up and I don&#8217;t know what to do.  How can I fix this?</p>
<p>Thanks<br />
Shelly</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deneme</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-13072</link>
		<dc:creator>deneme</dc:creator>
		<pubDate>Mon, 05 Dec 2011 17:22:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-13072</guid>
		<description>I&#039;m not positive where you are getting your info, however good topic. I needs to spend some time finding out much more or working out more. Thank you for excellent info I was searching for this info for my mission.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not positive where you are getting your info, however good topic. I needs to spend some time finding out much more or working out more. Thank you for excellent info I was searching for this info for my mission.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-11060</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Fri, 18 Nov 2011 17:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-11060</guid>
		<description>I am getting aproxy is undefind or not an object in IE not in firefox. any idea?

Thanks</description>
		<content:encoded><![CDATA[<p>I am getting aproxy is undefind or not an object in IE not in firefox. any idea?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: egemen</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-10453</link>
		<dc:creator>egemen</dc:creator>
		<pubDate>Mon, 31 Oct 2011 13:14:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-10453</guid>
		<description>hello, i have some issue about coldfusion grid,i try grid example but cold fusion given this error &quot;The tag handler grid does not have a setter for the attribute checkBoxSelection specified in the Tag Library Descriptor.&quot;,please can you help me?
my code is very simple 

SELECT id, name, surname,email
FROM egemen_deneme


cfgrid Example
&lt;i&gt;Currently available courses&lt;/i&gt;
&lt;!--- cfgrid must be inside a cfform tag. --&gt;



 .</description>
		<content:encoded><![CDATA[<p>hello, i have some issue about coldfusion grid,i try grid example but cold fusion given this error &#8220;The tag handler grid does not have a setter for the attribute checkBoxSelection specified in the Tag Library Descriptor.&#8221;,please can you help me?<br />
my code is very simple </p>
<p>SELECT id, name, surname,email<br />
FROM egemen_deneme</p>
<p>cfgrid Example<br />
<i>Currently available courses</i><br />
<!--- cfgrid must be inside a cfform tag. --></p>
<p> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rAMESH</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-9905</link>
		<dc:creator>rAMESH</dc:creator>
		<pubDate>Fri, 23 Sep 2011 14:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-9905</guid>
		<description>When i delete the grid is not refreshing, could you please tell me what should i do to fix this.
My environment is
CF8 and Sqlserver</description>
		<content:encoded><![CDATA[<p>When i delete the grid is not refreshing, could you please tell me what should i do to fix this.<br />
My environment is<br />
CF8 and Sqlserver</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa Walker</title>
		<link>http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/comment-page-2/#comment-9704</link>
		<dc:creator>Lisa Walker</dc:creator>
		<pubDate>Fri, 09 Sep 2011 20:28:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.anujgakhar.com/2008/03/18/crud-with-cfgrid-html-format/#comment-9704</guid>
		<description>applied cf 8.0.0 security patch and now cfgrid doesn&#039;t work in production site.
error:http: Error invoking CFC Source/4/volunteer_maintenance/committeeproductlinking.cfc : Not Found

info:widget: Created grid, id: committees

info:http: HTTP GET Source/4/volunteer_maintenance/committeeproductlinking.cfc?method=getproducts&amp;returnFormat=json&amp;argumentCollection=%7B%22page%22%3A1%2C%22pageSize%22%3A20%2C%22gridsortcolumn%22%3A%22%22%2C%22gridsortdir%22%3A%22%22%7D&amp;_cf_nodebug=true&amp;_cf_nocache=true&amp;_cf_clientid=332BB39BD6A314C17468DBFDD869B034&amp;_cf_rc=0

info:http: Invoking CFC: Source/4/volunteer_maintenance/committeeproductlinking.cfc , function: getproducts , arguments: {&quot;page&quot;:1,&quot;pageSize&quot;:20,&quot;gridsortcolumn&quot;:&quot;&quot;,&quot;gridsortdir&quot;:&quot;&quot;}

info:LogReader: LogReader initialized

info:global: Logger initialized


Worked before the patch was applied and still works in my test site on the same server as long as the cfc file is in the production folder.
I&#039;ve tried moving the cfc to a separate folder and creating a mapping for it, etc..  The CFIDE is a VD.  Without it the grid doesn&#039;t come up at all.</description>
		<content:encoded><![CDATA[<p>applied cf 8.0.0 security patch and now cfgrid doesn&#8217;t work in production site.<br />
error:http: Error invoking CFC Source/4/volunteer_maintenance/committeeproductlinking.cfc : Not Found</p>
<p>info:widget: Created grid, id: committees</p>
<p>info:http: HTTP GET Source/4/volunteer_maintenance/committeeproductlinking.cfc?method=getproducts&amp;returnFormat=json&amp;argumentCollection=%7B%22page%22%3A1%2C%22pageSize%22%3A20%2C%22gridsortcolumn%22%3A%22%22%2C%22gridsortdir%22%3A%22%22%7D&amp;_cf_nodebug=true&amp;_cf_nocache=true&amp;_cf_clientid=332BB39BD6A314C17468DBFDD869B034&amp;_cf_rc=0</p>
<p>info:http: Invoking CFC: Source/4/volunteer_maintenance/committeeproductlinking.cfc , function: getproducts , arguments: {&#8220;page&#8221;:1,&#8221;pageSize&#8221;:20,&#8221;gridsortcolumn&#8221;:&#8221;",&#8221;gridsortdir&#8221;:&#8221;"}</p>
<p>info:LogReader: LogReader initialized</p>
<p>info:global: Logger initialized</p>
<p>Worked before the patch was applied and still works in my test site on the same server as long as the cfc file is in the production folder.<br />
I&#8217;ve tried moving the cfc to a separate folder and creating a mapping for it, etc..  The CFIDE is a VD.  Without it the grid doesn&#8217;t come up at all.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

