Hi Nick,

I haven't tested it yet but it should work this way:

<cfformitem type="script">
function check_batch_state()
{
        
if(batchType.dataProvider[batchType.selectedIndex]['Adjustment_Batch_Type']=
'IND')
        {
                myButton.enabled = false;
                // if that bellow don't work try this
                _root.myButton.enabled = false;
        }
}
</cfformitem>

BTW: If you want to know more about the methods or properties of the
elements, take a look into the
Flex ActionScript and MXML API Reference
http://livedocs.macromedia.com/flex/15/asdocs_en/asdoc-title.html

Cheers, Artur



-----Original Message-----
From: Nick Han [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 02, 2005 12:10 AM
To: CF-Talk
Subject: cfgrid flash form question

Hi All, I am using a cfgrid flash type.

 

 

<cfgrid name="batchType"

      height=200

      width=410

              vspace="10"

      selectmode="edit"

      query="GetAdjustmentBatchTypes"

      insert="Yes"

      insertbutton="Add New Type"

              delete="yes" 

              onchange="check_batch_state()">

 

<cfformitem type="script">

   function check_batch_state(){

 
if(batchType.dataProvider[batchType.selectedIndex]['Adjustment_Batch_Typ
e']='IND'){

                                    I NEED TO DISABLE THE DELETE BUTTON IF
THIS ROW IS SELECTED

                        }

 

   }

   </cfformitem>

 

I want to be able to disable the 'delete' button via script, if the user
selects a certain row.  Any idea how I can reference the delete button since
it is auto generated by cfgrid when you set 'delete=yes'?





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225905
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to