CF Data Grid Binding- New to this CF Stuff

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default CF Data Grid Binding- New to this CF Stuff

    I amdrunning the demos from
    [url]http://www.macromedia.com/software/coldfusion/demos/[/url] and the demo for
    Coldfusion DataGrid and Binding is doing my head in. I can create the first
    couple of the demo flash forms no probs and I found it most enjoyable however
    changing the event to single or edit was kewl......However when I come to the
    last form I copy the code from the demo vidoe and nothiong happens ??? I get
    the following error messages
    2 Errors found.

    Error /CFIDE/gettingstarted/tutorial/grid.mxml:198 .
    and
    Error /CFIDE/gettingstarted/tutorial/grid.mxml:198
    The statement 'grid' is incomplete.

    Being new to CF I have racked my brains and looked and relooked and double
    checked the code on the demo video. What am I doing wrong????:confused;

    <html>
    <head>
    <title>Coldfusion Flash Form</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <cfquery name="artists" datasource="cfartgallery">
    SELECT firstName, lastName, city
    FROM Artists
    </cfquery>
    <cfform format="flash" width="500">

    <cfgrid name="grid" query="artists"
    selectmode="single">
    <cfgridcolumn name="firstName">
    <cfgridcolumn name="lastName">
    <cfgridcolumn name="city">
    </cfgrid>

    <cfinput type="text" name="firstName" label= "First Name"
    bind="{grid.selectionItem.firstName}"
    onChange="grid.dataProvider.editField{grid.selecte dIndex, 'firstName',
    firstName.text);">
    </cfform>

    </body>
    </html>

    cannyladUK Guest

  2. Similar Questions and Discussions

    1. trying to create data grid on the fly, with templated columns, and then updating all rows in the grid
      Hi, Please help, I'm trying to create data grid on the fly, with templated columns, for editing, and then updating all rows in the grid on one...
    2. Data grid loses binding
      I have three sets of xml connectors, datasets and datagrids in the same document each feeding off three separate xml documents. I have placed three...
    3. Binding from grid to cfselect
      This is what I can do: Select a row from the Grid and bind to to several input boxes. I have select boxes that change the data in the grid (it...
    4. Complex data binding question, binding child objects of a custom collection.
      I have a custom collection of objects, each of which includes a child object called MyUserOpener. In declarative binding, I can bind this property...
    5. data table binding to grid
      We have a data table bound to a datagrid. In the data table, there is a column of type decimal. Since any decimal in this column will always be a...
  3. #2

    Default Re: CF Data Grid Binding- New to this CF Stuff

    Two things:

    1) Use "selectedItem" not selectionItem
    2) You have a curly brace instead of an open parenthesis in the onChange code

    <cfinput type="text" name="firstName" label= "First Name"
    bind="{grid.selectedItem.firstName}"
    onChange="grid.dataProvider.editField(grid.selecte dIndex, 'firstName',
    firstName.text);">


    mxstu Guest

  4. #3

    Default Re: CF Data Grid Binding- New to this CF Stuff

    I thank you for the feedback. Much oblidged
    cannyladUK Guest

  5. #4

    Default Re: CF Data Grid Binding- New to this CF Stuff

    No problem :-)
    mxstu Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139