Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFGRID Problem with selectmode=edit

Status
Not open for further replies.

johk02

Programmer
Aug 20, 2003
169
AU
I guess it wasn't as easy as I thought :)

I have a problem with CFGIRD and selectmode=edit.
Two of the columns are editable, Live and LinksOrder. I want the user to be able to click on row which will take him to a detail page. This works fine, please have a look at The problem is that when you try to edit a Order for example the "Grid" thinks you want to go to the detail page. Are there any way to "disable" the 2 editable cells?? I have tried the Href option for cfgridcolumn but ut doesn't work and I have seen that others have problems with that too.
### Code ###
Code:
<cfoutput>
<cfform name="clients" format="flash" height="450" width="400" timeout="60"   >
 <cfgrid name="data" height="400" query="GetLinks" rowHeaders="false" onChange="getURL('links_testEdit.cfm?LinkID=' + data.dataProvider[data.selectedIndex]['LinksID']);" selectmode="edit">  
  <cfgridcolumn name="LinksName" header="Name" headeralign="left" dataalign="left" width="150" bold="no" italic="no"  select="no" display="yes" headerbold="no" headeritalic="no"  />
  <cfgridcolumn name="LinksLive" header="Live" display="yes"  type="boolean"/>
  <cfgridcolumn name="LinksID" display="false" width="0"/>
  <cfgridcolumn name="LinksOrder" select="yes"    />
 </cfgrid>

 <cfformgroup type="horizontal">
  <cfinput type="submit" name="editClient" value="Edit" >
  <cfinput name="submitit" type="Submit" value="Update Changes">

 </cfformgroup>       
</cfform>
</cfoutput>
### / Code ###


I have also tried to use the below code. The user selects a row and then click the edit button. It will reload the page and execute the cfif statement. Please have a look at 2 .cfm. It is sort of working but I am getting (I presume) the variables wrong that hold the row id.

### Code ###
Code:
<cfif isDefined("form.editclient")>
<cflocation url="links_testEdit.cfm?LinksID=#data.dataProvider[data.selectedIndex]['LinksID']#" addToken=false >
</cfif>

<cfoutput>
<cfform name="clients" format="flash" height="450" width="400" timeout="60"   >
 <cfgrid name="data" height="400" query="GetLinks" rowHeaders="false" selectmode="edit">  
  <cfgridcolumn name="LinksName" header="Name" headeralign="left" dataalign="left" width="150" bold="no" italic="no"  select="no" display="yes" headerbold="no" headeritalic="no"  />
  <cfgridcolumn name="LinksLive" header="Live" display="yes"  type="boolean"/>
  <cfgridcolumn name="LinksID" display="false" width="0"/>
  <cfgridcolumn name="LinksOrder" select="yes"    />
 </cfgrid>

 <cfformgroup type="horizontal">
  <cfinput type="submit" name="editClient" value="Edit" >
  <cfinput name="submitit" type="Submit" value="Update Changes">

 </cfformgroup>       
</cfform>
</cfoutput>
### / Code ###

If anyone have any suggestions please let me know

Jonas - cfgid and AS newbie
 
Its been a while since i've worked with flash based datagrids, but take a look at These guys deal with Flash based stuff alot and have stacks of great tutorials and examples on datagrids.

Have a look around, it can be quite inspirational.

Rob
 
Thanks TamedTech ,
I have had a look at their site before and I have to say the stuff they have is pretty cool.
I couldn't find anything that could point me into the right direction but I will keep looking

Cheers
Jonas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top