Cfgrid cfgridupdate
There seems to be a lot of old chatter about the cfgridupdate
not working but nothing recent. I am unsing MX7 with java version
1.4.2_05. I get the "Error casting an object of type to an
incompatible type " error message. I would love for this to work
since I need a very simple interactive grid. Any
Suggestions.
To answer my own question on this...
cfgridupdate wasn't working so I wrote a regular block of
code to make the required changes when submitting a grid.
Similar Messages
-
Cfgrid and rowStatus.Action
I posted this under 'Rich Forms' as well (just trying to
cover all the bases).
I'm having a problem pulling out the rowstatus property using
actionscript. If I use the following lines of code I receive an
appropriate response (ie: the Index and value of contactD will
appear in the Alert box):
var varIndex = findReferenceResults.getSelectedIndex();
var varID =
_root.findReferenceResults.getItemAt(varIndex).contactID;
alert('Variable Index: ' + varIndex);
alert('contactID: ' + varID);
However, when I try this:
var varIndex = findReferenceResults.getSelectedIndex();
var varID =
findReferenceResults.getItemAt(varIndex).rowStatus.Action;
alert('Variable Index: ' + varIndex);
alert('Rowstatus: ' + varID);
I still get my Index value, but the rowstatus.Action value
comes back as 'undefined'.
In the past, I've used cfgrid with cfgridupdate and with
cfif/cfloop could determine which rows were marked for
insertion/deletion/editing. I'm now switching over to flash forms,
but I'm at a loss as to how to pull the rowstatus property so I
will know which rows need insertion, etc.
Thanks for any help you may can provide!!!!!Thanks man
Frank Xu Lei--谦卑若愚,好学若饥
[老徐的网站]:http://www.frankxulei.com/
[老徐的博客]:http://54peixun.com/Author/frankxulei
微软WCF中文技术论坛
微软WCF英文技术论坛
微软WCF技术群:166599314 -
Hello,
I copy and pasted some code from WACK coldfusion book and i
can insert and delete lines on the screen, but when i refresh the
screen the changes didnt apply.
Any suggestions?
Am i supposed to add an update button also?
<!---
Name: grid2.cfm
Author: Ben Forta ([email protected])
Description: Flash editable data grid example
Created: 12/22/04
--->
<cfquery datasource="vdinfo" name="tableinfo">
Select * from uos
order by cwpartnbr
</cfquery>
<!--- Display data grid --->
<cfform format="flash" action="formdump.cfm">
<!--- Data grid --->
<cfgrid name="uos2"
selectmode="edit"
query="tableinfo"
insert="yes"
delete="yes"
height="400" />
</cfform>I have a similar problem where the update only effects some
of the records in the database - there are 4 records in the
database and I am able to only modify the 2nd and 3rd record -
changes made to the other records are ignored. The code follows:
<cfif isDefined("Form.Update")><!--Have we been
asked to update the database? -->
<cfgridupdate datasource="GISdb"
tablename="DistrictContacts" grid="g_Contacts">
Update was done.
</cfif>
<cfquery name="GetData" datasource="GISdb">
SELECT *
FROM DistrictContacts
</cfquery>
<cfform name="grid_test" action="Contacts_admin.cfm"
style="text-align:center" method="post">
<cfgrid name="g_Contacts" query="GetData"
colheaderbold="yes" selectmode="edit" width="100%" picturebar="yes"
delete="yes" sort="yes" insert="yes" maxrows="30"
selectcolor="##FF0000">
</cfgrid>
<cfinput type="submit" name="Update" value="Update the
database" tabindex="1">
</cfform>
There does not appear to be anything unique about the records
that would exlplain this. The result applies to any of the fields.
Any ideas? -
Cfgridupdate don't find grid parameter.. error
I use this code that I've found in the reference but when i
try to insert a new record coldfusion give me this error:
"cfgridupdate could not find the grid named FirstGrid"
So, i write a new code with cfgrid and cfgridupdate but
coldfusion give me always the same error.
but FirstGrid is the cfgrid name parameter passed to the page
for the cfgridupdate tag? I use CFMX 7.02 and win XP SP 2 with
Fiirefox 1.5.07
Thank you
Alessandro
(Sorry for my bad english!!! :-( )
<!--- If the gridEntered form field exists, the form was
submitted.
Perform gridupdate. --->
<cfif IsDefined("form.gridEntered") is True>
<cfgridupdate grid = "FirstGrid" dataSource =
"cfdocexamples" Keyonly="true"
tableName = "CourseList">
</cfif>
<!--- Query the database to fill up the grid. --->
<cfquery name = "GetCourses" dataSource =
"cfdocexamples">
SELECT Course_ID, Dept_ID, CorNumber,
CorName, CorLevel, CorDesc
FROM CourseList
ORDER by Dept_ID ASC, CorNumber ASC
</cfquery>
<h3>cfgrid Example</h3>
<I>Try adding a course to the database, and then
deleting it.</i>
<cfform>
<cfgrid name = "FirstGrid" width = "450"
query = "GetCourses" insert = "Yes" delete = "Yes"
font = "Tahoma" rowHeaders = "No"
colHeaderBold = "Yes"
selectMode = "EDIT"
insertButton = "Insert a Row" deleteButton = "Delete selected
row" >
</cfgrid><br>
<cfinput type="submit" name="gridEntered">
</cfform>
Text
Text cfgridupdate could not find the grid named
FirstGrid.You also need to define the grid columns. When you preview
your webpage, do you see an updateable grid with the code that
you're using?
I'd say you need something like whats pasted below:
The URL for the code pasted below is
http://www.webworldinc.com/cfdocs/Developing_Web_Ap...Fusion/12_Building_Dynamic_Java_Form s/dwa12_08.htm
The cfgrid tag is explained in detail over there.
<HTML>
<HEAD>
<TITLE>Simple Update Grid Example</TITLE>
</HEAD>
<CFQUERY NAME="CourseList"
DATASOURCE="cfsnippets">
SELECT * FROM Courses
</CFQUERY>
<BODY BGCOLOR="#FFFFFF">
<CFFORM NAME="GridForm"
ACTION="handle_grid.cfm">
<CFGRID NAME="course_grid"
HEIGHT=170
WIDTH=400
HSPACE=10
VSPACE=6
ALIGN="RIGHT"
SELECTCOLOR="white"
SELECTMODE="edit"
ROWHEADERS="YES"
ROWHEADERWIDTH=25
ROWHEADERALIGN="right"
COLHEADERS="YES"
QUERY="CourseList"
GRIDDATAALIGN="left"
BGCOLOR="green"
INSERT="YES"
DELETE="YES"
SORT="YES"
MAXROWS=60>
http://www.webworldinc.com/cfdocs/Developing_Web_Ap...Fusion/12_Building_Dynamic_Java_Form s/dwa12_08.htm
(3 of 10)9/29/2006 1:39:20 AM
Creating an Updateable Grid
<CFGRIDCOLUMN NAME="course_id"
HEADER="Course ID"
WIDTH=80
ITALIC="NO"
HEADERALIGN="center"
HEADERITALIC="NO"
HEADERBOLD="YES"
DISPLAY="NO">
<CFGRIDCOLUMN NAME="number"
HEADER="Course ##"
WIDTH=80
ITALIC="NO"
HEADERALIGN="center"
HEADERITALIC="NO"
HEADERBOLD="YES"
DISPLAY="YES"
SELECT="YES">
<CFGRIDCOLUMN NAME="description"
HEADER="Description"
WIDTH=240
ITALIC="No"
HEADERALIGN="center"
HEADERITALIC="No"
HEADERBOLD="Yes"
BOLD="Yes"
ITALIC="Yes"
DISPLAY="Yes">
</CFGRID>
<INPUT TYPE="Submit" VALUE=" Push me... "> <BR>
</CFFORM> -
Why is Cfgrid not working for me
I am using CFMX7
Why is this not working for me?
This is Gridtest1.cfm
<cfoutput>
<CFFORM align="center" ACTION="gridtest2.cfm"
METHOD="POST"
name="getstuff" >
<cfinput type="HIDDEN" name="ID" value="#form.id#" >
<cfinput type="HIDDEN" name="customerno"
value="#form.customerno#"
>
<cfgrid name="Mygrid" width="960" query="getpermits"
gridlines =
"yes" rowheaders="yes"
selectmode = "edit" height="350" >
<cfgridcolumn name="id" bgcolor="##FFFFFF" header="ID"
display="yes" WIDTH="40" select="no">
<cfgridcolumn name="permitno" bgcolor="##FFFFFF"
header="Permit
No" display="yes" width="70" select="yes">
<cfgridcolumn name="sortorder" bgcolor="##FFFFFF"
header="SortOrder" display="yes" WIDTH="62" select="yes">
</cfgrid>
<div align="center">
<cfINPUT TYPE="submit" VALUE="Save My Changes"
NAME="savemychanges"
>
</div>
</cfform>
</cfoutput>
This is GridTest2.cfm
Form fields:
<cfoutput>[#form.fieldnames#]</cfoutput>
Form values:
<cfloop list="#form.fieldnames#"
index="idx"><cfoutput>#idx# =
#Evaluate(idx)#</cfoutput>
</cfloop>
<cfif isdefined ("form.savemychanges")>
<cfgridupdate grid="mygrid" datasource = "divwt"
tablename =
"tankerpermits" keyonly="yes" >
</cfif>
<cfoutput>
form.#__CFGRID__GETSTUFF__MYGRID#.original.#permitno#
</cfoutput>
Output from TestGrid2.cfm reflects a �funny
looking� grid name and I
can see in the output that Permitno is definitely a defined
field.
Form fields:
[ID,CUSTOMERNO,SAVEMYCHANGES,__CFGRID__GETSTUFF__MYGRID]
Form values:
ID = 13
CUSTOMERNO = 21691
SAVEMYCHANGES = Save My Changes
__CFGRID__GETSTUFF__MYGRID = __CFGRID__EDIT__=3 id N Permitno
Y
sortorder Y 1 U 571 z
Element __CFGRID__GETSTUFF__MYGRID.ORIGINAL.PERMITNO is
undefined in
FORM.
The error occurred in
C:\cmudintranet\Purple\divwt\bftankertruck\gridtest2.cfm:
line 147
#form.__CFGRID__GETSTUFF__MYGRID.original.permitno#
Thanks in AdvanceLorna, be careful. This could cause your comments
to stop working. Blog comments are
sensitive..................
.......... Lorna says ................................................
Allyson, your precaution comes on the heels of me realizing that if I put a song on a blog summary page, then I will have to edit the .js file every time I add a blog entry.
Whereas MassReplaceIt could solve the problem there, the added issue of problems with comments is enough to make me stay away, so that is what I will do: No music within 250' of the blog guy.
Lorna in Southern California -
Ok, here is the scenario:
I have a flash cfgrid, love it. I then wanted to give the
user the ability to update the grid without having to open a new
page with a new form, so I enabled edit. Then, I learnt that you
cannot user select dropdowns in an flash editable grid, so I
thought ok, I will have a form below the grid, I can bind the
fields with the grid, then the user can click on any row they need
to update, and then submit. CFGRIDUPDATE will then sort through the
changes and bish bosh, we have a nice solution. However, I then
learnt you cannot just bind a cfselect in the same way as you can a
<cfinput. I have search for solutions but with no joy. I have
two problems I need to fix;
1) how to prepopulate the <cfselect with the data from the
selected row, as you do with a cftext
2) my <cfinput type=date field does not update the grid
when changed (also, the grid doesn't change when I select a new
date, but it does change to the previous one if I select a second
one! weird!)
Can anyone, please shed any light on this atall please?
I attach my code and will try and provide as much info as
possible, thanks in advance
(Why do i always find a great solution like a flash grid, to
then hit a brick wall like not being able to bind selects! aaarggh)
:)Ok I did something similar with the HTML cfgrid as I had more
data that could be visible to edit in the grid itself.
First create a <cfinput type="hidden"/> for each select
box with it bound to the grid like a normal text box.
Second create a function to handle assigning of the hidden
bound value to the CFSELECT:
function populateCFSelect(Grid,rowIndex,e){
var xyz = document.GridForm.hidden_xyz.value;
document.GridForm.xyz.value = xyz;
document.GridForm.xyz.text= xyz;
Third and almost important you need to ad a listener to your
Grid to run the function not sure if there is something differnet
with a flash gridb but here is the code for the html grid:
function init(){ //Build grid toolbars
grid = ColdFusion.Grid.getGridObject("<NAME OF YOUR
GRID>");
grid.addListener("rowclick",populateCFSelect);
Finally make sure your init() is being called at page
load....<cfset ajaxOnLoad("init")>
After you populate your inputs and select boxes you need to
update your datasource with the changes then refresh your grid to
show the changes. ColdFusion.Grid.refresh("<NAME OF YOUR
GRID>");will refresh your grid. -
Updating an editable cfgrid??????
I am trying to update an editable cfgrid with an action page
using the cfgridupdate and its just not working????
Is there a problem with ColdFusion 7.02???
Here’s my code. What am I doing wrong???
FORM PAGE
<cfquery datasource="#REQUEST.DataSource#"
name="getThe">
SELECT tbl_movies_venues.*
FROM tbl_movies_venues
WHERE tbl_movies_venues.moviesID = '#URL.moviesID#'
</cfquery>
<cfform
action="action/updateVenues.cfm"
format="flash"
width="770">
<cfgrid name="myGrid2" query="getThe" height="250"
colheaders="yes" rowheaders="no" selectmode="edit">
<cfgridcolumn name="venueID" header="Venue ID"
select="no" />
<cfgridcolumn name="moviesID" header="Movie ID"
select="no" />
<cfgridcolumn name="theatersBrID" header="Theatres ID"
select="no" />
<cfgridcolumn name="ven_status" header="Venue"
select="yes" />
<cfgridcolumn name="ven_times" header="Time" select="yes"
/>
</cfgrid>--->
<cfformgroup type="horizontal">
<input type="submit" value="Add Theaters to Movie">
</cfformgroup>
</cfform>
ACTION PAGE (this is on a different page)
<cfgridupdate grid="myGrid2"
dataSource="#REQUEST.DataSource#"
tableName="tbl_movies_venues"/>
Any help will be appreciatedDid you ever find an answer to this question?
-
I've been using CFGRID to allow users to update names and
addresses in a table via the web. The company has installed a new
program which uses a different version of the Java Applet. Once
downloaded and installed, my page shows but the cfgrid applet no
longer works. I also believe the java applet is no longer available
on their site. If anyone has a fix, I'd really appreciate some
help.
Thanks.I've had to use v1.3.0-01 for Java and I use FireFox. I can
get the grid to show but I can't seem to make cfgridupdate to work
since I went from CF5 to CF MX7 -
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. -
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.
-RickMassage?
Why not ask the masseuse who gave you the massage?
Maybe you are looking for
-
Unrecognize apple ID appear on my iphone app store, how i delete it?
i already have my apple ID, but when i want to use my iphone app store, there's unrecognize apple ID appear..and its not mine. and i dont know how another apple ID could appeared there.
-
Block cancellation/creation of billing document on CLOSED posting period
Hi Experts, Currently, user is allowed to cancel/create backdated billing document where period already closed, but it does not release to accounting automatically, due to the period has been closed. When account user found out that the accounting do
-
Problem in URL Encoding in J2ME
Hi, I have a problem in URL Encoding in J2ME. As i read thru the J2ME APIs, i found that J2ME doesn't support it. Or can i use the URL Encoding in J2SE to modify and put into J2ME? Or someone out there have done such coding? Reply me! Thanks!...
-
JDBC connector/J Installation HELP!
Hi, I am new to Java technology.I need to connect a MySQL database with Java. I downloaded the connector/J from mySql site. I am unable to install the same on a linux machine. PLEASE anyone help me with a step-by-step procedure for installing it.I do
-
Description of dimension member disappears on expansion
Hi folks, I am facing a strange issue in a report that I've created. When I expand or refresh the report, description of the column dimension members disappear. However, the column keys are displayed correctly. I've checked the dimension and descri