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>

Similar Messages

  • After upgrading to CF10, the selected row of my cfgrid is no longer passed on form post.

    I have a cfform which contains a cfgrid and prior to the 9 to 10 update, upon submission of the cfform, the selected row of the grid was passed/posted to my form action page as:
    __CFGRID__gridForm__renewalGrid
    This contained all the data from the selected row, I.e.:
    __CFGRID__COLUMN__=PROJECTID; __CFGRID__DATA__=T01081002AP; __CFGRID__COLUMN__=APPLICATIONS; __CFGRID__DATA__=PQFD; __CFGRID__COLUMN__=OWNERUID; __CFGRID__DATA__=HT2008; __CFGRID__COLUMN__=TEAM; __CFGRID__DATA__=Roberts; __CFGRID__COLUMN__=ROLE; __CFGRID__DATA__=AASBOAPMX; __CFGRID__COLUMN__=REGION; __CFGRID__DATA__=Southwest; __CFGRID__COLUMN__=EXISTING; __CFGRID__DATA__=K8045F; __CFGRID__COLUMN__=SOD; __CFGRID__DATA__=0; __CFGRID__COLUMN__=INITIALEMAILDATE; __CFGRID__DATA__=01/28/2013; __CFGRID__COLUMN__=MESSAGEDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=SECONDEMAILDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=ESCALATIONDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=COMPLETEDBY; __CFGRID__DATA__=TH2878; __CFGRID__COLUMN__=COMPLETIONDATE; __CFGRID__DATA__=02/06/2013; __CFGRID__COLUMN__=MONTHPULLED; __CFGRID__DATA__=Jan2013; __CFGRID__COLUMN__=TOTALITEMS; __CFGRID__DATA__=2; __CFGRID__COLUMN__=RELIEVINGPSA; __CFGRID__DATA__=; __CFGRID__COLUMN__=MODIFIEDBYTS; __CFGRID__DATA__=02/06/2013; __CFGRID__COLUMN__=MODIFIEDBY; __CFGRID__DATA__=T228Y8; __CFGRID__COLUMN__=CREATEDBY; __CFGRID__DATA__=KV3M36; __CFGRID__COLUMN__=CREATEDTS; __CFGRID__DATA__=01/28/2013; __CFGRID__COLUMN__=NEWSA; __CFGRID__DATA__=; __CFGRID__COLUMN__=DELEGATESTATUSNOTE; __CFGRID__DATA__=Access; __CFGRID__COLUMN__=STATUS; __CFGRID__DATA__=Completed; __CFGRID__COLUMN__=DATATYPE; __CFGRID__DATA__=Appl New
    After upgrading to CF10, and with no changes to the code, performing this same process, __CFGRID__gridForm__renewalGrid is still passed in the form scope to my action page, but now it is empty.
    I have not yet uninstalled CF9, so I brought it up on a different port, and I can run the same code as CF9 or CF10 and watch... in 9 the selected row is passed, in 10 it is empty.
    Is this a bug? Is there a work around? Please help.

    appears that apple has changed SMB code, and now its not possible login from windows on mac.
    i installed snow leopard and now works fine.
    apple is capable to make it run paying new license of smb code, but isnted of this, apple has created new protocol smbx and now, all others need to adapt your code to apple..
    bad movement.. i am thinking sell imac and no back to apple anymore..

  • Layout Issue using multiple CFGRID

    I am trying to get 4Flash Grids to layout side by side. It
    appears that there is plenty of room looking at the screen, but
    there are scroll bars on the right and bottom. How can I make these
    fit and center them as a group?
    Thanks.
    <div align="center">
    <cfform method="post" preloader="no" format="flash"
    skin="halosilver" width="1000">
    <cfformgroup type="horizontal">
    <cfgrid format="flash" name="managers"
    query="q_getManagers" selectmode="edit" width="200"
    height="300">
    <cfgridcolumn name="manager">
    </cfgrid>
    <cfgrid format="flash" name="categories"
    query="q_getCategories" width="200" height="300" selectmode="edit"
    >
    <cfgridcolumn name="Category">
    </cfgrid>
    <cfgrid format="flash" name="classification"
    query="q_getClassifications" width="200" height="300"
    selectmode="edit">
    <cfgridcolumn name="classification">
    </cfgrid>
    <cfgrid format="flash" name="facilities"
    query="q_getFacilities" width="200" height="300"
    selectmode="edit">
    <cfgridcolumn name="facility_name">
    </cfgrid>
    </cfformgroup>
    </cfform>
    </div>

    Hello!
    The layout management in OSMF prior to 1.6 sprint 3 was somehow inconsistant in composite elements.
    That(I guess) is a problem of layout measurement.
    Our player relies on osmf layouting greatly so I have posted a lot here already.
    May be it can help you:
    http://forums.adobe.com/thread/837062
    This topic contains referencies to other and to jira:
    http://bugs.adobe.com/jira/browse/FM-1174
    There is a "duct tape" proxy attached to jira bug it may help you if you put your composition to that proxy BEFORE settting it to media player.
    Since 1.6 sprint 3 the whole layout thing has changed and has become consistent - it does not work as expected at all :O)
    But as soon as you are on 1.0 the duct tape proxy may help
    Best regards!

  • CFGRID does not show data (CF9.0)

    Under development server, CFGRID show data , all is fine , correct. (CF9.0  version dev)
    Under production server , CFGRID does not show data, only a grey line (like a HR).
    How to debug this ?
    Thanks,

    Kindly check below to troubleshoot this issue:-
    Is there any difference between your CF production & developement server setting summary?
    Is there any browser script level difference between your both CF server?
    Are you getting any relevant logging error in your CF server application.log & exception.log?
    Run a very simple cfgrid running app to check, either getting issue with that too or not.

  • How can I call a custom javascript function when clicking on cfgrid cell.

    I would like to call a custom javascript function when
    clicking on a cell in an cfgrid (of html format). The closest thing
    I can find is to use the HREF="" attribute, but it doesn't seem to
    work with javascript inside it.
    Simple example:
    <cfgridcolumn name="Foo" header="Foo"
    href="javascript:customFunction(#ID#);">
    Do I need to tap into the underlying Ext JS funtionality? If
    so, where can I start?
    Thanks!

    Hi,
    According to your post, my understanding is that you want to hide/show list columns based on specify the permission for Users, SharePoint Groups or Active Directory Groups.
    Here is a solution from CodePlex for your reference:
    SharePoint 2013 Column & View Permission
    https://sp2013columnpermission.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Dynamically Hiding a Column in a CFGRID

    Here's the situation: I've got a flash form with a cfgrid.
    That grid has 4 columns. Is it possible to click a separate button
    in the form and hide/show one of the grid columns, similar to
    altering the "display" attribute of the <cfgridcolumn> tag? I
    know it's possible to click a button and hide the entire grid...
    Any help or comments would be most appreciated!

    Just FYI: I think I solved this by adjusting the column
    widths dynamically via Actionscript. There was something odd about
    how the grid handled the widths, though. I had to move the column
    all the way to the right in the grid and then set it's width to a
    negative value to "hide" it, which actually just pushed it off the
    screen.
    Let me know if you're still having trouble and I can dig up
    the code, but it probably won't be that useful if you have to hide
    multiple columns.

  • Delete button in CFGRID

    I am attempting to use the CFGRID tag on a ColdFusion 8
    Server. I have set the format attribute to HTML and have it binding
    to a cfc. I have set the onChange attribute to a cfc method.
    SelectMode is set to edit and the Delete attribute is set to yes.
    The data grid does allow me to edit the records and
    successfully updates. The issue is that I can not delete rows. I
    don't see a delete button at all. I feel like I am missing
    something very simple.
    Any help would be most appreciated. Thanks.

    I got it.
    Because I was only displaying two columns, the grid was not
    wide enough to display the DELETE button.
    I fixed it by adding the attribute WIDTH="350" and then also
    added the attribute AUTOWIDTH="yes".

  • How can I select the row after a cfgrid refresh?

    I have a form that is bound to a cfgrid.  The grid is populated from a database.  When you navigate in the grid the data displayed in the form changes to match the selected row.  I can edit the data in the form and update the database.  After updating the data I refresh the cfgrid, which then displays the updated data.
    Unfortunately the cfgrid always highlights the first row, row 0, after a refresh.  I want to highlight the same row that was highlighted when the data was edited and saved.  Can anyone advise as to how I can do that?
    I have tried setting a listener when the grid is initiated that responds whenever the store is refreshed and triggers the function refreshSelection():
    g.getStore().on('load', refreshSelection) ;
    Before the form data is saved, the row number is stored in selectedRow[0].  When the grid is refreshed, refreshSelection is run:
    function refreshSelection() {
    if (0 >= selectedRecords.length)
         return;
    alert('Selected row is Row ' + selectedRecords[0] ) ;
    g.getSelectionModel().selectRow(selectedRecords[0]) ;
    selectedRecords[0] = 0 ;
    The alert shows the correct row number each time, but highlighting the last row viewed works intermittently, and only if the alert line is active.  If I comment out the alert, this fails every time, with row 0 being highlighted.  selectedRecords[0] is reset to 0 after the attempt to select the row so that navigation through the grid, such as choosing "Next Page," will properly highlight the first row of the page rather than the last row number that was edited.
    -Rick

    Massage?
    Why not ask the masseuse who gave you the massage?

  • Error inserting a row into a table with identity column using cfgrid on change

    I got an error on trying to insert a row into a table with identity column using cfgrid on change see below
    also i would like to use cfstoreproc instead of cfquery but which argument i need to pass and how to use it usually i use stored procedure
    update table (xxx,xxx,xxx)
    values (uu,uuu,uu)
         My component
    <!--- Edit a Media Type  --->
        <cffunction name="cfn_MediaType_Update" access="remote">
            <cfargument name="gridaction" type="string" required="yes">
            <cfargument name="gridrow" type="struct" required="yes">
            <cfargument name="gridchanged" type="struct" required="yes">
            <!--- Local variables --->
            <cfset var colname="">
            <cfset var value="">
            <!--- Process gridaction --->
            <cfswitch expression="#ARGUMENTS.gridaction#">
                <!--- Process updates --->
                <cfcase value="U">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                    <cfquery datasource="#application.dsn#">
                    UPDATE SP.MediaType
                    SET #colname# = '#value#'
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <!--- Process deletes --->
                <cfcase value="D">
                    <!--- Perform actual delete --->
                    <cfquery datasource="#application.dsn#">
                    update SP.MediaType
                    set Deleted=1
                    WHERE MediaTypeID = #ARGUMENTS.gridrow.MediaTypeID#
                    </cfquery>
                </cfcase>
                <cfcase value="I">
                    <!--- Get column name and value --->
                    <cfset colname=StructKeyList(ARGUMENTS.gridchanged)>
                    <cfset value=ARGUMENTS.gridchanged[colname]>
                    <!--- Perform actual update --->
                   <cfquery datasource="#application.dsn#">
                    insert into  SP.MediaType (#colname#)
                    Values ('#value#')              
                    </cfquery>
                </cfcase>
            </cfswitch>
        </cffunction>
    my table
    mediatype:
    mediatypeid primary key,identity
    mediatypename
    my code is
    <cfform method="post" name="GridExampleForm">
            <cfgrid format="html" name="grid_Tables2" pagesize="3"  selectmode="edit" width="800px" 
            delete="yes"
            insert="yes"
                  bind="cfc:sp3.testing.MediaType.cfn_MediaType_All
                                                                ({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"
                  onchange="cfc:sp3.testing.MediaType.cfn_MediaType_Update({cfgridaction},
                                                {cfgridrow},
                                                {cfgridchanged})">
                <cfgridcolumn name="MediaTypeID" header="ID"  display="no"/>
                <cfgridcolumn name="MediaTypeName" header="Media Type" />
            </cfgrid>
    </cfform>
    on insert I get the following error message ajax logging error message
    http: Error invoking xxxxxxx/MediaType.cfc : Element '' is undefined in a CFML structure referenced as part of an expression.
    {"gridaction":"I","gridrow":{"MEDIATYPEID":"","MEDIATYPENAME":"uuuuuu","CFGRIDROWINDEX":4} ,"gridchanged":{}}
    Thanks

    Is this with the Travel database or another database?
    If it's another database then make sure your columns
    allow nulls. To check this in the Server Navigator, expand
    your DataSource down to the column.
    Select the column and view the Is Nullable property
    in the Property Sheet
    If still no luck, check out a tutorial, like Performing Inserts, ...
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    John

  • Urgent CFGrid-Combo-DataProvider Question

    Dear all,
    I have this code to create combos in cfgrid. My question now
    is .. how to replace the hardcoded countries with query? The code
    is saved in AS file (.as). The full codes can be found at
    http://cfpim.blogspot.com/2005_08_01_cfpim_archive.html
    See
    Grid cellRenderer in Flash forms topic.
    function createChildren(Void) : Void{
    combo = createClassObject( ComboBox, "combo", 1,
    {owner:this});
    combo.dataProvider = [{data:'SGP',label:'Singapore'},
    {data:'JPN',label:'Japan'}, {data:'USA',label:'United States of
    America'}, {data:'AUS',label:'Australia'},
    {data:'IND',label:'India'}];
    combo.addEventListener("change", this);
    Thanks in advance
    Keiko

    Dan,
    I wanted to try your method, but I got another error (if I
    take the content of .AS file and put it inside cfsavecontent).
    Below is my code ...
    Seems that I cannot place import or createChild inside
    CFSaveContent. Any help will be very much appreciated.
    Keiko
    <cfform format="Flash" skin="haloSilver">
    <cfsaveContent variable="onLoad">
    import mx.controls.ComboBox;
    class GridRenderer extends mx.core.UIComponent {
    var combo;
    var listOwner : MovieClip;
    var getCellIndex : Function;
    var getDataLabel : Function;
    function createChildren(Void) : Void{
    combo = createClassObject( ComboBox, "combo", 1,
    {owner:this});
    combo.dataProvider = [{data:'SGP',label:'Singapore'},
    {data:'JPN',label:'Japan'}, {data:'USA',label:'United States of
    America'}, {data:'AUS',label:'Australia'},
    {data:'IND',label:'India'}];
    combo.addEventListener("change", this);
    function getPreferredHeight(Void) : Number{
    return combo != undefined ? 25:0;
    function setValue(str:String, item:Object){
    var val = item.country;
    for(var i = 0; i < combo.dataProvider.length; i++){
    combo.dataProvider
    .data == val ? combo.selectedIndex = i : '';
    function change() {
    listOwner.editField(getCellIndex().itemIndex,
    getDataLabel(), combo.selectedItem.data);
    function(){
    _level0.myGrid.rowHeight=25;
    _level0.myGrid.getColumnAt(2).cellRenderer = GridRenderer;
    }.call()
    </cfsavecontent>
    <!--- grid with 3 columns name, firstName, department
    --->
    <cfgrid name="myGrid" width="400">
    <cfgridColumn name="Name">
    <cfgridColumn name="Country">
    <cfgridrow data="Name 1, SGP">
    <cfgridrow data="Name 2, USA">
    </cfgrid>
    <cfinput type="submit" name="cmdSubmit" value="Submit to
    see the form dump">
    <!--- onLoad trigger --->
    <cfinput type="text" visible="No" width="0" height="0"
    name="trigger2" bind="{1==2?'':#onLoad#}">
    </cfform>

  • CFGRID, was working in CF8 won't display results in CF11

    Hi
    I recently upgraded a client from CF 8 to CF 11.
    In the code is a CFGRID which was working in CF8 but now in CF11 the grid displays but no data appears (the grid is simply empty).
    With debugging enabled the Coldfusion Ajax Logger is reporting the following error:
    Uncaught SyntaxError: Unexpected identifier (http://hiddenServer.com/index.cfm?action=job.manageJobOperations&jobId=2395&cfdebug, line 104)
    Line 104 is the "</cfgrid>" tag.
    Here is cfgrid code, complete with it's bound cfselect statement immediately before it:
    <cfselect name="primarysupplier" query="getconcretecompanies" display="name" value="id" required="yes"  />
    <cfgrid name="mixdesigns" format="html" bind="cfc:controller.Controller.getMixDesign({primarysupplier},{cfgridpage},{cfgridpagesize},{c fgridsortcolumn},{cfgridsortdirection},{primaryconcrete:jobid})" bindonload="yes" height="400" selectmode="row" sort="yes" selectonload="false">
                                <cfgridcolumn name="id" display="no" />
                                    <cfgridcolumn name="selectcode" select="yes" display="yes" header="Select" width="40" />
                                    <cfgridcolumn name="shortcompanyname" display="yes" header="Supplier" width="75" select="no" />
                                    <cfgridcolumn name="mixnumber" display="yes" header="Mix Number" width="75" select="no" />
                                    <cfgridcolumn name="psistrength" display="yes" header="PSI" width="45" select="no" />
                                    <cfgridcolumn name="cubicyardprice" display="yes" header="Price" width="50" select="no" />
                                    <cfgridcolumn name="description" display="yes" header="Description" width="180" select="no" />
                                </cfgrid>
    I've dumped the query that populates the cfselect and there are no empty rows.
    The console at the bottom of Chrome simply reports the same error, "Uncaught syntaxError. Unexpected identifier".
    Has anyone else encountered this issue? If nothing else I'd love to learn how to debug this error, it seems as if there is some extra data being fed to the cfgrid but I can't seem to trap it....
    Anyone?
    Thanks in advance for your help,
    Rich

    Anit
    Could you please clarify?
    In the Adobe bug report for this issue (Bug#3759630 - CFGRID with BIND to CFC failed for an incorrect JavaScript)
    ... it mentions
    Build
    Found In Build
    CF11_Final
    Fixed In Build
    289972
    Doesn't that mean if the Coldfusion version that I'm running is Coldfusion version 11,0,0,289974, then my build would already have the fix rolled up in it? Or am I not reading the versioning correctly?
    Thanks,
    Rich

  • CFGRID date sort is not working in Coldfusion 9

    <!--- using cfgridcolum type="date" --->
    <cfset emps = querynew("firstname,department, salary,startdate")>
    <cfset queryaddrow(emps,3)>
    <cfset querysetcell(emps,"firstname","Debra",1)>
    <cfset querysetcell(emps,"department","Accounting",1)>
    <cfset querysetcell(emps,"salary","100000",1)>
    <cfset querysetcell(emps,"startdate","2009/11/09",1)>
    <cfset querysetcell(emps,"firstname","Doherty",2)>
    <cfset querysetcell(emps,"department","Finance",2)> 
    <cfset querysetcell(emps,"salary","120000",2)> 
    <cfset querysetcell(emps,"startdate","2005/09/02",2)> 
    <cfset querysetcell(emps,"firstname","Ben",3)> 
    <cfset querysetcell(emps,"department","Law",3)> 
    <cfset querysetcell(emps,"salary","200000",3)> 
    <cfset querysetcell(emps,"startdate","2010/08/09",3)> 
    <cfform name="form01"> 
        <cfgrid format="html"  insert="yes" insertButton="Add Row" 
            name="grid01" 
            selectmode="edit" 
            width=600 
            collapsible="true" 
            title="Employees" 
            autowidth="yes" 
            query="emps" 
            sort="yes" 
            > 
                <cfgridcolumn name="FirstName" header="FirstName"/> 
                <cfgridcolumn name="Department" header="Department" /> 
                <cfgridcolumn name="Salary" display=true header="Salary" type="numeric" values="1000000,1200000" valuesdisplay="1000000,1200000"/> 
                <cfgridcolumn name="StartDate"  display=true header="StartDate" type="date" mask="d/m/Y"/> 
        </cfgrid> 
    </cfform> 
    when i sort the grid column StartDate , it is doing to text sort instead of date sort, did anybody else face the same issue?

    I'm still getting the same effect.  I added a mask and the data still
    sorts as if it is a string.  Both date columns are Oracle date types.
      <cfgridcolumn name="TASKNAME" header="Type" width="200">
      <cfgridcolumn name="ORIG_StartDate" mask="Y/m/d" type="date"  header="Start Date"  width="200">
      <cfgridcolumn name="ORIG_ENDDATE" mask="Y/m/d" type="date" header="End Date" width="200">
    Mark <><

  • Passing Variable in CFGRID

    Hi I am usin coldfuison 9 and have a grid that gets poplulated by a query in a .cfc
    The queries work and the grid poplulates except when I try to add a hyperlink to a field that should link to a detail page.
    Here is my code I am an beginner working on someday intermediate -- thank you
    My GRID: This works except when I try to add a link to the RoadName field.
    <cfform>
       <cfgrid name="completed"
                 format="html"
                  pagesize="20" selectmode="row" bind="cfc:proposed.getComplete({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridso rtdirection})">
             <cfgridcolumn name="ProjectID" header="ProjectID" width="77" display="no" select="no"/>  
            <cfgridcolumn name="Region" header="Region" width="52"/>
            <cfgridcolumn name="LegislativeDistrict" header="Leg Dis" width="50"/>
            <cfgridcolumn name="CountyName" header="County" width="80"/>
            <cfgridcolumn name="TRC" header="TRC" width="45"/>
      <cfgridcolumn name="ProjectNumber" header="Project##" width="70"/>
        <cfgridcolumn name="a href="/Funding/Grants/RAP/ROLProjects/compProjectDetail.cfm?projectID=#complete.projectID#">#comp lete.RoadName#"
    "header="ProjectName" width="240">
        </cfgrid>
    </cfform>

    I doubled check, and the item/variable P620_BRIEFCASEID is on the page. I will see if I can get close to recreating the problem on apex.oracle.com and get back with you.
    But I can also describe what is going on better.
    i have a page 620, that was created using the Form, form on a tablr with report wizard, the report is 620 the form was 621. Next I wrote a pl/sql procedure that is called beforw the header that does some processing on the briefcase table based on the briefcaseid that is passed in, it defaults to NULL and exits if the briefcaseid is null. Then I edited the record link on page 620 to call it's self and pass the #BRIEFCASEID# as the value of :P620_BRIEFCASEID. The URL has the correct item and value ( at least what I am expecting ).
    I will start on the apex.oracle.com and let you know.
    Thanks
    Merph
    http://apex.oracle.com/pls/apex/f?p=42248:1

  • CFGRID format=HTML not working in IE8

    I'm using Cold Fusion 10 and trying a cfgrid and it does not work in IE8.  It works perfectly in FF, of course. :-).
    It IS within a Cfform in my .cfm file.  Even when I take it down to it's simplest form to try to debug it doesn't work, but here is my original code:
    <cfgrid name = "FirstGrid"
            height="200" width="700"
            font="arial" fontsize="12"
            query = "Getdates"
            SORT="Yes"
            selectmode="edit"
            format="html"
            >
            <CFGRIDCOLUMN NAME="anumber" DATAALIGN="LEFT"
            BOLD="No" ITALIC="No"
            SELECT="No" DISPLAY="No"
            HEADERBOLD="No" HEADERITALIC="No">
        <CFGRIDCOLUMN NAME="schoolyear" HEADER="School Year"
            HEADERALIGN="LEFT" DATAALIGN="LEFT"
            BOLD="Yes" ITALIC="No"
            SELECT="Yes" DISPLAY="Yes"
            HEADERBOLD="No" HEADERITALIC="Yes">
        <CFGRIDCOLUMN NAME="doh" HEADER="Date of Hire"
            HEADERALIGN="LEFT" DATAALIGN="LEFT"
            BOLD="No" ITALIC="No"
            SELECT="Yes" DISPLAY="Yes"
            HEADERBOLD="No" HEADERITALIC="No" type="date">
        <CFGRIDCOLUMN NAME="leavedate" HEADER="Leave Date"
            HEADERALIGN="LEFT" DATAALIGN="LEFT"
            FONT="Times" BOLD="No"
            ITALIC="No" SELECT="Yes"
            DISPLAY="Yes" HEADERBOLD="No"
            HEADERITALIC="No">
        <CFGRIDCOLUMN NAME="Returnfromleavedate" HEADER="Return From Leave Date"
            HEADERALIGN="LEFT" DATAALIGN="LEFT"
            BOLD="No" ITALIC="No"
            SELECT="Yes" DISPLAY="Yes"
            HEADERBOLD="No" HEADERITALIC="No">
        <CFGRIDCOLUMN NAME="terminatedresignedretireddate" HEADER="Terminated/Resigned/Retired"
            HEADERALIGN="LEFT" DATAALIGN="LEFT"
            BOLD="No" ITALIC="No"
            SELECT="Yes" DISPLAY="Yes"
            HEADERBOLD="No" HEADERITALIC="No">
        </cfgrid>
    Thanks for any help!
    B.

    Sorry, I should have used the code tags. Let me ask that again.
    I have HTML formatted data stored in VARCHAR2 columns on the database for which I am using a stylesheet to format into XSL-FO to resolve the HTML tags. For example, my data template populates a field PARAGRAPH_TEXT with content such as
    <b>some bold text</b>and I am using
    <xsl:apply-templates select="PARAGRAPH_TEXT"/>in my RTF template to process the data using the stylesheet to convert it to
    <fo:inline font-weight="bold">some bold text</fo:inline>The HTML tags are corrrectly resolved when using the BI Publisher Word add-in and the output is correctly rendered in bold text but this does not happen when running on the server in an E-Business Suite environment due to the HTML tags in the output XML being generated as e.g. &lt;b&gt; instead of <b>. Has anybody experienced this and, more importantly, can anybody suggest a way of getting e.g. <b> in the XML instead of &lt;b&gt;

  • Need to have a popup window from a link in a cfgrid

    I've got a cfgrid that is displaying some program
    information. I want the program number to have a link to a pop-up
    window which contains an edit form for that program.
    Here is the script for the popup window I used on my page
    before I implemented a cfgrid:
    <script type="text/javascript">
    function loadEditForm(id) {
    windowReference =
    window.open('frmPrograms.cfm?CFGRIDKEY='+id,"editProgramWindow",'scrollbars=no,menubar=no ,height=500,width=750,resizable=no,toolbar=no,location=no,status=no');
    </script>
    I've already changed the url to use the CFGRIDKEY.
    Here are my cfgridcolumns:
    <cfgridcolumn name="program_id" display="no">
    <cfgridcolumn name="program_name" header="Name"
    bold="yes" href="?" hrefkey="program_id" width="300"
    type="string_noCase">
    <cfgridcolumn name="description" header="Description"
    width="650" select="no">
    I tried making the program_name cfgridcolumn have an
    href="javascript:loadEditForm(#URLEncodedFormat(Trim(program_id))#)"
    but this isn't working. I get an error message that the variable
    program_id doesn't exist.
    I've done a grid that links to an edit form in another
    section, the difference is that wasn't using a pop-up window. And I
    can send my form to a new window using target=_blank, but I really
    would rather use a pop-up window for this.

    This link may help.
    http://www.danvega.org/blog/index.cfm/2008/3/4/ColdFusion-8-Grid-Context-Menu-Part-II

Maybe you are looking for