0 Replies Latest reply on Sep 27, 2006 8:02 AM by Newsgroup_User

    CFGrid Question

    Level 7
      I have a grid, populated by a query. The query is already filtered by a
      cfcookie I've set. The cookie is a numeric value, from 1-50.

      Here's the CFC, which I call in a CFGRID.

      --------------------------------------------------------
      <cffunction name="Submitted" access="public" returntype="query"
      output="false">
      <cfargument name="ID" type="numeric" required="true">
      <cfquery name="rsSubmittedBy" datasource="SurveyCase">
      SELECT txtIMName, numAutonumber, Location
      FROM dbo.tblSubmittedBy
      WHERE Location = #ARGUMENTS.ID#
      ORDER BY SortNumber ASC
      </cfquery>
      <cfreturn rsSubmittedBy>
      </cffunction>
      ----------------------------------------------------------------------------
      --

      Here's the rest:

      <cfif IsDefined("form.gridEntered") is True>
      <cfgridupdate grid = "hello" dataSource = "SurveyCase"
      Keyonly="true" tablequalifier="Incidents" tableName =
      "Incidents.dbo.tblSubmittedBy">
      </cfif>
      <cfinvoke
      component="Survey.Incidents"
      method="Submitted"
      returnvariable="rsSubmittedBy">
      <cfinvokeargument name="ID" value="#COOKIE.ID#">
      </cfinvoke>


      <cfform format="flash" skin="haloblue" width="550">
      <cfgrid name="hello" width="500" query = "rsSubmittedBy" insert = "Yes"
      selectmode = "EDIT">
      <cfgridcolumn name = "txtIMName" header="Name:">
      <cfgridcolumn name = "Location">
      </cfgrid>
      <cfinput type="submit" name="gridEntered" value="Submit">
      </cfform>

      --------------------------------------------------------------------------

      HERE'S THE PROBLEM:

      I want the user to ONLY be able to add, or edit, information in the column
      with the header "Name:". The second column, I need to insert (or keep) the
      numeric value of the afformentioned Cookie. So if the Cookie is set to '1',
      I want:

      Name Location
      -------------------------------------
      Steve Harris 1


      I would prefer for the Location column not to be shown to the user at all.

      Please help! :)

      THANKS!