Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
Armtusk #1
Add Items to CFGrid
The scenario is simple. I have a textbox where the user enters some value,
clicks an "Add" button and I want that value to get added to a CFGrid which
might ahve some data from before.
I am aware of the "insertbutton" parameter for the CFGrid and that won't work
for me. I was wondering if there is a way thru ActionScript or somehow, that
one can programmatically add items to a given cfgrid.
Thanks in advance,
Saurabh.
P.S.- Also, can anyone point me to a good resource where one can learn about
using ActionScript in CFMX flash forms and what ActionScript methods anfd
objects aren't available for use in CFMX 7.
Armtusk Guest
-
Creating master page where global items arearranged ABOVE local items
When you create a mater page, obviously all the items are arranged below anything on the individual pages. Is there a way of creating a master... -
Selecting items from DataSet items collection that werechanged
hello. how to choose items from DataSet items collection that were changed (for example added to collection, changed)? -
possible for publishers to edit Library Items /recurrent items like navigation?
I'd love to see this possibility too, but I think it's not possible. -
Adding items to a cfgrid
Hi! I'm trying to add items to a cfgrid using form elements. E.g. I have fname textfield, lname textfield, market comboBox, etc in my form I want... -
possible for publishers to edit Library Items / recurrent items like navigation?
No, you have to use an include of some sort. If you don't want to use SSI you can do it with Javascript. Search Google with the keyword "Javascript... -
Flying Condom #2
Re: Add Items to CFGrid
Hello Saurabh, I think you should try this: The grid is called Grid_Units and
the textfield's name is BaseValue <cfinput name='Unit_Add' type='button'
value='Add' onclick=' var varBaseValue; // A variable to hold the inserted
text, needed because when you run the third line, the textfield was emptied
varBaseValue = BaseValue.text; //Get the text from a textfield in the
actionscipt variable GridData.insertRow(Grid_Units); //Add a new line to the
grid Grid_Units.dataProvider.editField(Grid_Units.selec tedIndex, 'BaseValue',
varBaseValue); //the dataProvider is used to get the data in the grid'> Hope
it helps for your issue. Daniel btw -- I'm lookon for the same dokus, please
give a link.
Flying Condom Guest
-
Armtusk #3
Re: Add Items to CFGrid
Thanks Daniel,
I was able to use your code and the CFMX example to get it to work.
Here's what I did.
<cfform format="flash">
<cfquery name="getArtists" datasource="cfcodeexplorer">
select * from artists
</cfquery>
<cfgrid name="artistGrid" query="getArtists" rowheaders="false">
<cfgridcolumn name="firstName" header="First Name">
</cfgrid>
<cfformgroup type="horizontal" label="Name">
<cfinput type="text" name="firstname" label="First">
</cfformgroup>
<cfinput type="button" name="btnAdd" value="Add Item"
onclick="GridData.insertRow(artistGrid);artistGrid .dataProvider.editField(artist
Grid.selectedIndex, 'FIRSTNAME', firstname.text);">
</cfform>
Links: [url]http://www.asfusion.com/blog[/url] [There are some good examples there]
Armtusk Guest



Reply With Quote

