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.
Similar Messages
-
Hello,
I have about 10 checkboxes that I would like to show as
checked or unchecked in a cfform. The cfgrid does not need to show
the checkboxes. So I have 3 columns in my cfgrid
(firstName,lastName,company) these all bind just fine to cfinput
type="text". There are 10 bit/boolean columns in the same database
table that I need binded to my form. When I selected a record the
forms update fine with the following code.
<cfinput type="text" name="firstname" label="First"
bind="{membersGrid.dataProvider[membersGrid.selectedIndex]['FirstName']}"
onChange="membersGrid.dataProvider.editField(membersGrid.selectedIndex,
'FIRSTNAME', firstname.text);">
But when trying to do something similiar for a cfinput type
of checkbox I get no where.
Any assistance would be greatly appreciated.
Thanks,
RyanTry this:
<cfsavecontent variable="change">
if (myGrid.selectedItem.active == 0 ) {
myCheckBox1.selected = false;
else {
myCheckBox1.selected = true;
</cfsavecontent>
<cfform name="myForm" format="flash" height="500">
<cfgrid name="myGrid" query="rsMyQuery"
onchange="#change#">
<cfgridcolumn name="field1" display="yes">
<cfgridcolumn name="myCheckBox1" display="no">
</cfgrid>
<cfinput type="text" name="field1"
bind="{myGrid.selectedItem.field1}">
<cfinput type="checkbox" name="myCheckBox1" checked="no"
value="0" label="myCheckBox1">
</cfform>
Then obviously you can spawn the logic for each additional
checkbox in the same onchange event.
Hope this helps.
Joel -
Multiple submit buttons in flash form
I need to make this page so that when the submit button is
pressed, the action page will be based on the cfforgroup, not on an
overall form action. Essentially I have 2 main tabs and multiple
tabs underneath each one of those that need seperate action calls
on submit:
<cfquery name="modelinfo" datasource="inventory">
SELECT cd_manufacturer.name + ' ' +
model + ' ' +
processor_type + ' ' +
processor_speed AS system,
cd_manufacturer.name + ',' +
model + ',' +
processor_type + ',' +
processor_speed AS val_list
FROM cd_manufacturer
INNER JOIN cd_model ON
cd_manufacturer.pk_manufacturer=cd_model.fk_manufacturer
</cfquery>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title></title>
</head>
<cfquery name="modelinfo" datasource="inventory">
SELECT cd_manufacturer.name + ' ' +
model + ' ' +
processor_type + ' ' +
processor_speed AS system,
cd_manufacturer.name + ',' +
model + ',' +
processor_type + ',' +
processor_speed AS val_list
FROM cd_manufacturer
INNER JOIN cd_model ON
cd_manufacturer.pk_manufacturer=cd_model.fk_manufacturer
</cfquery>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>IT Asset Tracking System Main Menu</title>
</head>
<body>
<cfform format="flash">
<cfformgroup type="tabnavigator"><!--begin main
navigation-->
<cfformgroup type="page" label="Asset"><!-- Begin
sub page ASSET---->
<cfformgroup type="tabnavigator"><!-- Begin sub
page ASSET navigator---->
<!---ADD ASSET START (uses asset_processes/newAsset.cfm
for processing)---------------------->
<cfformgroup type="page" label="Add Asset"
action="asset_processes/newAsset.cfm">
<cfset vdate=DateFormat(Now(), "mm/dd/yyyy")>
<cfinput type="datefield" name="cdate" width="150"
label="Entry Date" validateat="onSubmit" validate="noblanks"
required="yes">
<cfselect
label="System Type"
name="modelinfo"
query="modelinfo"
required="yes"
multiple="no"
display="system"
value="val_list"
width="350">
</cfselect>
<cfinput type="text" name="location" width="150"
label="location" validateat="onSubmit" validate="noblanks"
required="yes">
<cfinput type="text" name="user" width="150" label="user"
validateat="onSubmit" validate="noblanks" required="yes">
<cfinput type="submit" name="submit" value="Create New
Asset" />
</cfformgroup><!--end page Add Asset -->
<!------------END PAGE ADD
ASSET------------------------------------------------------>
<!--------------- Assign LotID START (uses
standard/assignLotID.cfm for processing)--->
<cfformgroup type="page" label="Assign lotID">
</cfformgroup><!--end page Assign LotID -->
<!-----------------ASSIGN LOTID
END------------------------------>
<!----------------------Add to surplus
START--------------------->
<cfformgroup type="page" label="Add to Surplus">
</cfformgroup><!--end page add to surplus -->
<!------------------END ADD TO
SUPLUS------------------------------>
<!---------------------------ADD OTHER
START----------------------->
<cfformgroup type="page" label="View Inventory (not
surplused)">
</cfformgroup><!-- end page "View Inventory (not
surplused)"-->
<!---------------------------END
OTHER---------------------------->
</cfformgroup><!-- end sub page ASSET--------->
</cfformgroup><!-- end sub page ASSET
navigator---->
<cfformgroup type="page"
label="maintenance"><!--begin sub page maintenance-->
</cfformgroup><!--end sub page maintenance-->
</cfformgroup><!-- end main navigation -->
</cfform>
</body>
</html>Here's my code and thanks for your help!
<!--- begin form --->
<cfform format="flash" width="850" height="750"
action="insert.cfm" skin="haloblue">
<!--- begin tab navigator --->
<cfformgroup type="tabnavigator">
<!--- Begin check out tab --->
<cfformgroup label="Equipment Check-Out" type="page"
width="600">
<cfinput type="datefield"
name="dueDate"
label="Due Date:" message="Please Select a Valid Due Date"
validate="date"
required="yes"
width="100">
<!--- Equipment Information --->
<cfselect enabled="yes" name="equipTag" size="1"
label="Select Property Tag:" required="yes" multiple="no"
width="100">
<cfoutput query="allEquipTag">
<option value="#equipTag#">#equipTag#</option>
</cfoutput>
</cfselect>
<!--- Person Information --->
<cfinput type="text"
name="csulbID"
label="CSULB ID:"
message="A CSULB ID is required and must be 9 Digit!"
mask="999999999"
required="yes"
size="10"
maxlength="9" >
<cfinput type="text"
name="fName"
label="First Name:"
message="A First Name is required!"
required="yes"
size="10" >
<cfinput type="text"
name="lName"
label="Last Name:"
message="A Last Name is required!"
required="yes"
size="10" >
<cfinput type="text"
name="phone"
label="Phone Number:"
message="Phone Number is required!" mask="999-999-9999"
required="yes"
size="10" >
<cfinput type="text"
name="email"
label="Email:"
message="Email required! i.e. [email protected]"
required="yes"
validate="email"
size="15" >
<cftextarea name="notes"
label="Additional Notes:"
rows="5"
width="300"/>
<cfinput type="submit" name="btnSubmit" Label='checkOut'
tooltip="Submit Check-Out Information" id="btnSubmit"
value="Submit">
<!--- end check-out tab--->
</cfformgroup>
<!--- start Check-In Tab --->
<cfformgroup label="Equipment Check-In" type="page"
width="850" height="700">
<!--- start data grid--->
<cfgrid name="equipCheckInGrid"
query="equipCheckIn"
selectmode="browse"
griddataalign="left"
height="300"
width="800">
<!--- Don't show all columns and change header
name--->
<cfgridcolumn name="dueDate" header="Due Date">
<cfgridcolumn name="checkOut" header="Checked Out">
<cfgridcolumn name="checkIn" header="Checked In">
<cfgridcolumn name="csulbID" header="CSULB ID">
<cfgridcolumn name="fName" header="First Name">
<cfgridcolumn name="lName" header="Last Name">
<cfgridcolumn name="phone" header="Phone">
<cfgridcolumn name="email" header="Email">
<cfgridcolumn name="notes" header="Additional Notes">
<cfgridcolumn name="equipTag" header="Equip Tag">
<!--- end data grid--->
</cfgrid>
<!--- start input fields--->
<cfinput type="text"
name="checkInEquipTag"
label="Equipment Tag:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['equipTag']}"
size="15">
<cfinput type="text"
name="checkInDueDate"
label="Due Date:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['dueDate']}"
size="15">
<cfinput type="text"
name="checkInCheckOut"
label="Checked Out:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['checkOut']}"
size="15">
<cfinput type="text"
name="checkInCheckedIn"
label="Checked In:"
width="150"
value="#DateFormat(now(), "MM/DD/YYYY")#">
<cfinput type="text"
name="checkInCSULBID"
label="CSULB ID:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['csulbID']}"
size="15">
<cfinput type="text"
name="checkInFName"
label="First name:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['fName']}"
size="15">
<cfinput type="text"
name="checkInLName"
label="Last Name:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['lName']}"
size="15">
<cfinput type="text"
name="checkInPhone"
label="Phone:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['phone']}"
size="15">
<cfinput type="text"
name="checkIneEmail"
label="Email:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['email']}"
size="15">
<cftextarea type="text"
name="checkInNotes"
label="Additional Notes:"
bind="{equipCheckInGrid.dataProvider[equipCheckInGrid.selectedIndex]['notes']}"
width="300"
rows="5"/>
<cfinput type="submit" name="btnUpdate" Label='update'
tooltip="Submit Update Information" id="btnSubmit"
value="Check-In">
<!--- end Check-In Tab --->
</cfformgroup>
<!--- overdue tab --->
<cfformgroup label="Equipment Over-Due" type="page"
width="850" height="700">
<cfgrid name="equipOverDueGrid"
query="equipOverDue"
selectmode="browse"
griddataalign="left"
height="300"
width="800">
<!--- Don't show all columns and change header
name--->
<cfgridcolumn name="dueDate" header="Due Date">
<cfgridcolumn name="checkOut" header="Checked Out">
<cfgridcolumn name="checkIn" header="Checked In">
<cfgridcolumn name="csulbID" header="CSULB ID">
<cfgridcolumn name="fName" header="First Name">
<cfgridcolumn name="lName" header="Last Name">
<cfgridcolumn name="phone" header="Phone">
<cfgridcolumn name="email" header="Email">
<cfgridcolumn name="notes" header="Additional Notes">
<cfgridcolumn name="equipTag" header="Equip Tag">
<!--- end data grid--->
</cfgrid>
</cfformgroup>
<!--- end tab navigator--->
</cfformgroup>
</cfform> -
Hello,
I have a query that has begun to slow overtime and would like to see if there is anything that can be done as far as cleaner code that could speed things back up. This query populates an html crgrid. This is a MySQL DB. TIA
QUERY:
<cfquery name="getRecordcount" datasource="#dsn#">
select count(editbcastreq.bcast_id) as editcount
from bcastreq
left join editbcastreq
on bcastreq.bcast_id = editbcastreq.bcast_id
where bcastreq.bcast_id = #url.cfgridkey#
group by bcastreq.bcast_id
</cfquery>
<cfset editcounts = '#getRecordcount.editcount#'>
<cfif #editcounts# is 0>
<cfquery name="getLastedit" datasource="#dsn#">
select *
from bcastreq
inner join affiliate
on bcastreq.affiliate_id = affiliate.affiliate_id
inner join affiliatetype
on affiliatetype.affiliatetype_id = affiliate.affiliatetype_id
where bcastreq.bcast_id = #url.cfgridkey#
</cfquery>
<cfelseif #editcounts# gte 1>
<cfquery name="getLastedit" datasource="#dsn#">
select *
from editbcastreq
inner join affiliate
on editbcastreq.affiliate_id = affiliate.affiliate_id
inner join affiliatetype
on affiliatetype.affiliatetype_id = affiliate.affiliatetype_id
where editbcastreq.bcast_id = #url.cfgridkey#
order by edit_id desc
</cfquery>
</cfif>
CFGRID:
<cfoutput>
<cfform>
<table border="1" width="50%">
<tr>
<td>
Filter By: <cfselect id="filtercolumn" name="filtercolumn" bind="cfc:alumforms.broadcast.cfc.Users.getUserColumns()"
display="ColumnName" value="ColumnName" bindOnLoad="true" />
Filter Text: <cfinput type="text" id="filter" name="filter" >
<cfinput type="button" name="filterbutton" value="Filter" id="filterbutton" onclick="ColdFusion.Grid.refresh('usersgrid',false)">
</td>
</tr>
<tr>
<td id="gridtd" style="padding-top:10px;">
<div style="min-height:200px;">
<cfgrid name="usersgrid" pagesize="20" format="html" width="625" height="450"
bind="cfc:alumforms.broadcast.cfc.Users.getUsers({cfgridpage},{cfgridpagesize},{cfgridsort column},{cfgridsortdirection},{filtercolumn},{filter})" href="editreq.cfm" hrefkey="bcast_id" gridlines="yes" striperows="yes" >
<cfgridcolumn name="bcast_id" header="Broadcast ID" display="no" >
<cfgridcolumn name="affiliatetype_id" header="Affiliate Type ID" display="no">
<cfgridcolumn name="affiliate_id" header="Affiliate ID" display="no">
<cfgridcolumn name="affiliatename" header="Affiliate Name" width="150">
<cfgridcolumn name="subject" header="Subject" width="350">
<cfgridcolumn name="editcount" header="No. Edits" width="50" >
<cfgridcolumn name="reqtimestamp" header="Submit Date" width="75" >
</cfgrid>
</div>
</td>
</tr>
<tr>
</tr>
</table>
</cfform>
</cfoutput>
<cfset AjaxOnLoad("getGrid")>Your first query does not need a group by clause. In fact, I'm not even sure you need the first query at all. With that left join, you are simply selecting the number of records in the bcastreq table that match the url.gridkey. Depending on your intent, either changing the left join to an inner join, or simply selecting from one table will get you started.
-
Hi all,
I built a simple query builder form:
<cfif IsDefined('form.query')>
<cfquery name="queryDemo" datasource="TestProduction">
#form.goQuery#
</cfquery>
</cfif>
FORM
<ul>
<cfform name="QueryForm" action="" method="post">
<li><label>Type Query</label></li>
<li><cftextarea name="goQuery" cols="100" rows="6"></cftextarea></li>
<li><cfinput name="query" type="submit" value="Run Query"/></li>
</cfform>
</ul>
<cfif IsDefined('form.query') and queryDemo.recordCount gt 0>
<cfform action="" name="resultsForm">
<cfgrid query="queryDemo" griddataalign="center" name="QueryResults" width="700" autowidth="yes" height="700">
</cfgrid>
</cfform>
</cfif>
When I run a "where" clause such as where type = 'LCR', I get an error. Has anyone tried this before? Please provide insight.
Thanks.Error Code:
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near 'LCR'.
The error occurred in C:\inetpub\wwwroot\cfAttica\betaFiles\queryDemo.cfm: line 3
1 : <cfif IsDefined('form.query')>
2 : <cfquery name="queryDemo" datasource="TestProduction">
3 : #form.goQuery#
4 : </cfquery>
5 : </cfif>
VENDORERRORCODE
102
SQLSTATE
HY000
SQL
select item from tlkp_item where type = ''LCR''
DATASOURCE
TestProduction
Resources: -
Jump menu + cfgrid image width height problems
2nd day and no answer of anyone, please help! Just to simple
questions:
1. HOw could I build a cfselect jump menu, since JavaScript
does not work with cfforms?
2. Does anyboy knows why the thumbnail inside a cfgrid does
crop beyond 75px x 70px dimension? HOw could I put a 120px x 94px ?
Thank you!once I removed the "auto" setting everything worked just fine, the images came in at the proper pixel size, and the thumb nail images where proportional in size seeing how I had a height set of 40 px the width took care of itself.
Any Ideas on where I can find a good tutorial on client login and password to access pages with their content? -
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! -
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
KeikoDan,
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,
RichAnit
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 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. <b> 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 <b> -
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 -
Getting the parameters in url using cfgrid to cfc....
please help!!!
passing parameters to cfc using the cfgrid bind...
im using the cfc bind if u hard coded the query in the cfc its works but if u need to pass a parameters in cfc bind its not working...
for example...
my url with parameter is http://localhost/index.cfm?empid=123&start_date=2009/05/01
<cfform>
<cfajaxproxy bind="javascript:todetail({maingrid.id@change},{maingrid.firstname@none},{maing rid.lastname@none})" />
<cfgrid format="html"
name="maingrid"
bind="cfc:#request.cfcpath#users.getGridas({cfgridpage},{cfgridpagesize},{cfgri dsortcolumn},{cfgridsortdirection})"
preservepageonsort="true"
appendkey="no"
selectonload="false"
width="750"
style="clear:both;" colheaderalign="center"
>
<cfgridcolumn name="id" display="no" />
<cfgridcolumn name="datatime" header="DATE" width="100"/>
</cfgrid>
</cfform>
my query in cfc file:
select * from hrd_emp
WHERE 0=0
<cfif arguments.id NEQ "">AND (id='#arguments.id#')</cfif>
<cfif arguments.whereClause NEQ "">AND (#preserveSingleQuotes(arguments.whereClause)#)</cfif>
AND (EmpNo = '#######') =====> i need to put the empid=123 from the url http://localhost/index.cfm?empid=123&start_date=2009/05/01
PLEASE HELP!!!Pam, here's how I solved this one. Note the order of the bindings and the order of the bindings in the CFC must be the same as well. Hopefully this helps:
<!--- create cfgrid with results from url.CFGRIDKEY variable --->
<cfform name="getUsers">
<cfgrid format="html" name="displayUsersActive" autowidth="yes" selectmode="row" striperows="yes" pagesize="13" bind="cfc:getUsers.SPActiveUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgrid sortdirection},'#url.CFGRIDKEY#')" width="700" height="360">
<cfgridcolumn name="intfkclassid" display="no">
<cfgridcolumn name="txtLName" header="Last Name" headerbold="yes" width="20">
<cfgridcolumn name="txtFName" header="First Name" headerbold="yes">
<cfgridcolumn name="startdate" header="Start Date" width="30" headerbold="yes">
<cfgridcolumn name="enddate" header="End Date" headerbold="yes">
<cfgridcolumn name="classno" header="Class No" headerbold="yes" hrefkey="intfkclassid" href="allEnrolled.cfm" >
</cfgrid>
</cfform>
<!--- getUsers.cfc ----------->
<cfcomponent>
<!--- METHOD: List Active users method --->
<CFFUNCTION NAME="SPActiveUsers" access="remote" RETURNTYPE="struct">
<cfargument name="gridpage" type="numeric" required="true" />
<cfargument name="gridpagesize" type="numeric" required="true" />
<cfargument name="gridsortcolumn" type="string" required="true" />
<cfargument name="gridsortdirection" type="string" required="true" />
<cfargument name="cfgridkey" required="false" type="string" default=""/>
<cfif arguments.gridsortcolumn eq "">
<cfset arguments.gridsortcolumn = "txtLName" />
<cfset arguments.gridsortdirection = "asc" />
</cfif>
<!--- get user's info --->
<cfquery datasource="#application.dsn#" name="getUsers">
select a.intuserid,
a.txtFname,
a.txtLname,
b.intfkclassid,
c.intclassid,
convert(varchar,c.dtstartdate,106) as startdate,
convert(varchar,c.dtenddate,106) as enddate,
right('00' + convert(varchar,c.intclassyr),2) + '-' + right('00' + convert(varchar,c.intclassno),2) as classno,
c.intclassNo,
c.intclassyr
from tblusers a, tblenrollment b, tblclasses c
where a.intuserid = b.intfkuserid and
b.intfkclassid = c.intclassid
<cfif arguments.cfgridkey NEQ "" and isnumeric(arguments.cfgridkey)>
and c.intclassid = #arguments.cfgridkey#
<cfelseif arguments.cfgridkey NEQ "" and arguments.cfgridkey EQ "active">
and c.blnIsActive = 1
<cfelseif arguments.cfgridkey NEQ "" and arguments.cfgridkey EQ "inactive">
and c.blnIsActive = 0
<cfelse>
and 1 = 1
</cfif>
order by #arguments.gridsortcolumn# #arguments.gridsortdirection#
</cfquery>
<CFRETURN queryconvertforgrid(getUsers, gridpage, gridpagesize)>
</CFFUNCTION>
</cfcomponent> -
Flash CFGRID Insert Row Problem
I think others have posted similar issues, but I've been
unable to find a resolution to it. I have a Flash grid in an
Accordion page that I need users to be able to insert data into.
Most of the time, the grid will be empty when the user enters data.
I've tried using the picturebar insert button, I've tried using
onClick="GridData.insertRow(mygrid);". I even tried a fairly
extensive script that seemed to be a timer that would detect a
double click to insert. None of these work well. The
onClick="GridData.insertRow(mygrid);" is the best in that I only
have to click a column field about 3 times before I can enter data
in the field. Multiple clicks to activate the field is just not
useable.Hi,
Thanks for the reply, I have the same problem. The suggestion you gace did not work as it works only for flash grids. I am using an HTML grid.I just want to set a default value of OLST to the Client column. Please help!
<cfgrid name = "FirstGrid"
format="html"
height="320"
width="580"
font="Tahoma"
fontsize="12"
query = "rsIncidentTypes"
bgcolor="orange"
selectmode="edit"
selectcolor="teal"
delete="true"
insert="true"
insertButton = "Insert a Row"
deleteButton = "Delete selected row"
onChange="FirstGrid.dataProvider.editField(FirstGrid.selectedIndex,'Client', 'OLST');"
> -
I have trouble prepolualting cfselect in the flash form. When
i click on the cfgrid I want specific drop down to be prepopulated
(i have 18 of them) based on the type.
Here is my cfgrid
<cfgrid name="myGrid" query="tempQuery" height="445"
width="200" rowheaders="false" onchange="#getComboBoxValue#">
<cfif menuQuery.menuID is not lloc>
<cfgridcolumn name="menuID" header="menuID" display="no"
/>
<cfgridcolumn name="label" header="label" />
<!--- <cfgridcolumn name="link" header="link"
/>--->
<cfset lloc= menuQuery.menuID>
</cfif>
</cfgrid>
And here is the drop downs
<cfloop index="i" list="#lLIst#">
<cfscript>
LoadaccessLevelType =
createObject("component","Erik.maintenace").LoadaccessLevelType(#i#);
</cfscript>
<cfselect query="LoadaccessLevelType" value="accessLevel"
display="description" name="access#i#" width="200"
label="#LoadaccessLevelType.display#"/>
</cfloop>
Where lList is number from 1 to 18.
My actionScript is here
<cfsavecontent variable="getComboBoxValue">
<cfloop query="TempQuery">
<cfif TempQuery.accessType neq ''>
//Set a temp variable to hold the current comboBox value
var temp1;
//Loop through all the comboBox values
for(var i = 0; i < access#accessType#.length; i++){
//if (myGrid.selectedItem.accessType == temp1) {
//set the comboBox to the current index
access#accessType#.selectedIndex=i;
//set temp to the value of the comboBox
temp1=access#accessType#.value;
//if temp equals the selected clientID then stop looping
through the comboBox
if(temp1==myGrid.selectedItem.accessValue){
break;
</cfif>
</cfloop>
</cfsavecontent >There are too many things going on: function call on an
object instance, actionscript function stored in a variable and the
grid itself. It is difficult to debug. I would start by using an
actual query to test the code. -
Cfgrid not displaying in flash format
<cfform format="flash" width="1000"
action="editContact.cfm">
<cfgrid name="contact" query="contact_details"
selectmode="edit" insert="yes" delete="yes" height="200"
width="1000" align="middle">
<cfgridcolumn name="ID" display="no">
<cfgridcolumn name="FIRST_NAME">
<cfgridcolumn name="LAST_NAME" >
<cfgridcolumn name="JOB_TITLE">
<cfgridcolumn name="EMAIL" >
<cfgridcolumn name="PHONE">
</cfgrid>
<br>
<cfinput type="submit" value="submit" name="submit">
</cfform>
Hi, the code above using cfgrid in flash format used to
display perfectly. But after some time, without changing the code,
cfgrid is not displaying anymore. Any reasons why this is
happening? Thanks.What error do you see? Anything?
Try tracing the page request by using coldfusion/jrun's
sniffer.exe,
Charles, or some other
tool. See what is going on. If the applet is starting to load,
enable the java console and review the errors there.
Does this issue happen on multiple client machines or just
one? What version of CFMX7 are you using (run sysinfo from
cfadmin).
Maybe you are looking for
-
Pages '08 eliminates styles?
I've been reading reviews on pages '08 and there is talk of the new formatting bar, but no one has mentioned if the Styles feature has been removed. I use styles for my documents and was wondering if Pages 08 eliminated them in favor of the formattin
-
Why am I being charged for data when connected to wifi AND not using my phone?!
WHY am I being charged for data that I'm not using? At times when I'm asleep AND my phone is connected to wifi?! This happens at really specific, alternating times like 9:54 pm every day, or 12:01 am, 6:01 am and then 12:01pm and 6:01pm. When I call
-
How can I change the tip strip display time?
I would like to have the tip strip appear for a longer time, or even have it stay as long as the user hovers over the control. Any suggestions? I don't want to use an event structure because that would be major surgery on a legacy application. Thanks
-
Making a photo book from multiple albums
Hello. I recently returned from week long trip and have created photo albums for each individual day (9 albums) I now want to bring them all into 1 photo book but cannot seem to figure out how to do it. Do I have to just copy everything into one huge
-
How do you retrieve the value?
Hi There, XML request is: <?xml version="1.0" encoding="utf-8"?> <payload> <region> <__type>Category:#Test.XYZ.Framework.Categorization</__type> <Extension></Extension> <Id></Id> <Name> <en></en> </Name> </region>