I have a cfgrid with a custom insert button, not the button that comes 
with the grid.  When clicking the insert button, a row is inserted and 
that row is highlighted a particular color.  I now need to have 
additional functionality in that when the insert button is pressed, the 
currently inserted row will go into edit mode as if the user clicked the 
mouse on that cell.  The code is below.  Just so I'm clear, I need it so 
when the insert button is pressed, whatever row just got inserted goes 
into edit mode so the user doesn't have to first click on that row 
before typing in the cells. 

<cfsavecontent variable="gridChange">
    var grdEmails = grdEmails;
    var index = grdEmails.length;
    GridData.insertRow(grdEmails);
    grdEmails.setPropertiesAt(index, {backgroundColor:0xCBEFFE});
</cfsavecontent>


    <cfform format="Flash" skin="halosilver" action="#currentscript#" 
preservedata="yes" method="post" name="sendBrochure" height="850" 
width="550" style="fontFace:Arial;">
....
<cfformgroup type="horizontal">
                    <cfformitem type="text" width="100" 
style="fontSize:14; fontWeight:bold;">
                        Send To:
                    </cfformitem>
                    <cfgrid query="contents" name="grdEmails" 
maxrows="200" selectmode="EDIT" rowheaders="No" height="150" width="410" 
colheaderbold="Yes" colheaderfontsize="11" fontsize="9">
                        <cfgridColumn name="id" display="no">
                        <cfgridColumn name="user_id" display="no">
                        <cfgridColumn name="email" header="Email 
Address" width="150">
                        <cfgridcolumn name="fname" header="First Name" 
width="125">
                        <cfgridcolumn name="lname" header="Last Name" 
width="125">
                    </cfgrid>
                </cfformgroup>
               
                <cfformgroup type="horizontal" width="410" 
style="marginLeft:110">           
                    <cfinput type="button" name="ins" 
onClick="#gridChange#" value="Insert">
                    <cfinput type="button" name="del" value="Delete" 
onClick="GridData.deleteRow(grdEmails);">
                    <cfinput type="button" name="delAll" 
disabled="false" value="Delete All" onClick="#doDeleteAll#">   
                </cfformgroup>
....
</cfform>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255225
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to