item selected cfselect with cfgrid

Ask a Question related to Coldfusion Flash Integration, Design and Development.

  1. #1

    Default item selected cfselect with cfgrid

    If anyone's found a better way to make an item selected in a cfselect using
    cfgrid that the following, let me know:

    <cfgrid name="AddressGrid" format="Flash" query="Addresses" maxRows="5"
    selectmode="edit" insert delete insertbutton="Add New Address"
    deletebutton="Delete Selected Address"
    onchange="for (var i:Number = 1; i<State.length; i++) {if
    (State.getItemAt([i]).data == AddressGrid.selectedItem.State)
    State.selectedIndex = i}">
    <cfgridcolumn name="AddressID" display="no">
    <cfgridcolumn name="Contact" header="Name">
    <cfgridcolumn name="State" header="State">
    </cfgrid>
    <cfselect name="State" width="160" required message="State is a required
    field.">
    <cf_state7>
    </cfselect>

    After much time and effort spent reading flex docs, I just decided to loop
    through the options in the select... Is this best coding practices?

    -- Ian O'Betz
    Clear Results
    [url]www.clearresults.net[/url]



    Ian O'Betz Guest

  2. Similar Questions and Discussions

    1. how do you populate cfselect when cfgrid selected row ischanged
      hi can anyone enlighten me as to how to pass data to a cfselect from a cfgrid i am using a listner function so that the grid can populate form...
    2. cfselect in cfgrid
      Does anyone know how to place a cfselect element in a cfgrid or if it is even possible? I need an editable grid. It would be ideal if one of the...
    3. selected= not working in cfselect
      I am working on my admin interface for a department and I need to have a cfselect actually hilight the value that is passed from a query (like it is...
    4. testing whether row/item selected in cfgrid on submitformat=flash
      I have a cfgrid format=flash. Can you demonstrate how to validate that a row has been selected when the user clicks submit and provide feedback if a...
    5. CFSELECT + CFGRID
      I have 2 queries 1 shows all customers other shows all accounts. I would like to have a CFSELECT that shows all customers, then in the CFGRID- blank...
  3. #2

    Default Re: item selected cfselect with cfgrid

    This is the only reliable way I've been able to do it myself, so far.

    --nimer


    "Ian O'Betz" <sysopNUNYO@SPAMclearresults.net> wrote in message
    news:cv1ge6$p0g$1@forums.macromedia.com...
    > If anyone's found a better way to make an item selected in a cfselect
    > using
    > cfgrid that the following, let me know:
    >
    > <cfgrid name="AddressGrid" format="Flash" query="Addresses" maxRows="5"
    > selectmode="edit" insert delete insertbutton="Add New Address"
    > deletebutton="Delete Selected Address"
    > onchange="for (var i:Number = 1; i<State.length; i++) {if
    > (State.getItemAt([i]).data == AddressGrid.selectedItem.State)
    > State.selectedIndex = i}">
    > <cfgridcolumn name="AddressID" display="no">
    > <cfgridcolumn name="Contact" header="Name">
    > <cfgridcolumn name="State" header="State">
    > </cfgrid>
    > <cfselect name="State" width="160" required message="State is a
    > required
    > field.">
    > <cf_state7>
    > </cfselect>
    >
    > After much time and effort spent reading flex docs, I just decided to loop
    > through the options in the select... Is this best coding practices?
    >
    > -- Ian O'Betz
    > Clear Results
    > [url]www.clearresults.net[/url]
    >
    >
    >

    Mike Nimer Guest

  4. #3

    Default Re: item selected cfselect with cfgrid

    Sounds good to me. Thanks Mike.

    -- Ian
    "Mike Nimer" <mnimer@macromedia.com> wrote in message
    news:cv2h94$g6a$1@forums.macromedia.com...
    > This is the only reliable way I've been able to do it myself, so far.
    >
    > --nimer
    >
    >
    > "Ian O'Betz" <sysopNUNYO@SPAMclearresults.net> wrote in message
    > news:cv1ge6$p0g$1@forums.macromedia.com...
    > > If anyone's found a better way to make an item selected in a cfselect
    > > using
    > > cfgrid that the following, let me know:
    > >
    > > <cfgrid name="AddressGrid" format="Flash" query="Addresses" maxRows="5"
    > > selectmode="edit" insert delete insertbutton="Add New Address"
    > > deletebutton="Delete Selected Address"
    > > onchange="for (var i:Number = 1; i<State.length; i++) {if
    > > (State.getItemAt([i]).data == AddressGrid.selectedItem.State)
    > > State.selectedIndex = i}">
    > > <cfgridcolumn name="AddressID" display="no">
    > > <cfgridcolumn name="Contact" header="Name">
    > > <cfgridcolumn name="State" header="State">
    > > </cfgrid>
    > > <cfselect name="State" width="160" required message="State is a
    > > required
    > > field.">
    > > <cf_state7>
    > > </cfselect>
    > >
    > > After much time and effort spent reading flex docs, I just decided to
    loop
    > > through the options in the select... Is this best coding practices?
    > >
    > > -- Ian O'Betz
    > > Clear Results
    > > [url]www.clearresults.net[/url]
    > >
    > >
    > >
    >
    >

    Ian O'Betz Guest

  5. #4

    Default Re: item selected cfselect with cfgrid

    Would you happen to know how to do the same thing with radio buttons instead of a select list?

    TIA
    bwellisch 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