Professional Web Applications Themes

Making a single DG cell editable - Macromedia Flex General Discussion

As per usual, I apologise in advance if this subject has come up before. I couldn't find anything in a search. The scenario I have currently is one that must be fairly common. I have a datagrid that I'm populating from a database table and which would like users to be able to add a record to. Here's where I run into a problem: once I've added the new row for their record, I only want the cells in that row to be editable. The rest of the datagrid must remain uneditable. I can only assume this is a fairly ...

  1. #1

    Default Making a single DG cell editable

    As per usual, I apologise in advance if this subject has come up before. I
    couldn't find anything in a search.

    The scenario I have currently is one that must be fairly common. I have a
    datagrid that I'm populating from a database table and which would like users
    to be able to add a record to. Here's where I run into a problem: once I've
    added the new row for their record, I only want the cells in that row to be
    editable. The rest of the datagrid must remain uneditable. I can only assume
    this is a fairly common requirement, but no matter what I try, I just can't
    figure out a way to do it. I've gotten as far as trying various events on the
    grid and depending on the row that was clicked, flagging the grid as editable
    or not. The problem there is more often than not, the focus on the row doesn't
    keep up with the click, so the focus remains on the new row and the old record
    becomes editable. I've included a screenshot
    [url]http://www.nerf-this.com/jay/row-focus.JPG[/url] to illustrate what I mean a bit
    better in case I haven't explained it well.

    I'm fairly sure I've missed something obvious, because I can only assume this
    would be a logical use for a datagrid. Anyone able to shed some light on the
    subject for me?

    Verata Guest

  2. #2

    Default Re: Making a single DG cell editable

    AFAIK, there is no simple way to do this. the 1.5 DataGrid is a bit primitive
    if you are used to activeX controls.

    I would approach this using a cell renderer, but I have not done it so I won't
    be much help.

    Tracy

    ntsiii Guest

  3. #3

    Default Re: Making a single DG cell editable

    Thanks, Tracy.

    In the end I did use a cell renderer containing a label and either combobox or
    textbox, whose visibility I switched depending on whether the cell was allowed
    to be edited or not. Not an ideal solution, but one that works fairly well.

    Verata Guest

  4. #4

    Default Re: Making a single DG cell editable

    Hi,

    Just curious if I could see an example of this? thanks!
    amers Guest

Similar Threads

  1. Question making a pdf file non editable
    By abhishek kumar pandey in forum Brainstorming Area
    Replies: 0
    Last Post: September 16th, 03:11 PM
  2. Making editable datagrid.
    By trialproduct2004@yahoo.com in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: October 13th, 12:00 PM
  3. Datagrid: single cell selection
    By Peepio in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: August 19th, 02:56 PM
  4. Setting focus to first editable cell in datagrid
    By greenb in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: July 11th, 07:46 PM
  5. Add shading to a single cell.
    By Thomasa Gregg in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: June 22nd, 04:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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