Datagrid Column editing

Pete pete at mollysrevenge.com
Wed Jan 18 21:37:57 EST 2012


I did find a way to do some of the things you mentioned Bob (see my post in
this thread).  I think the autoadd of a new row in the datagrid could
easily be implemented in the OpenNextFieldEditor by checking if you are on
the last column of the last row, calling AddData to add another row, then
sending EditKey to the first editable column of the new row.

Not sure about the return key moving down one row  You might be able to
trap the returnInField message the dgLibrary handles it but passes it down
the message path after it has done its thing.

There's no way I'd want to try making a datagrid behave like even the
simplest spreadsheet but you can probably mimic some of a spreadsheet's
navigation tools.

Pete

On Wed, Jan 18, 2012 at 2:47 PM, Bob Sneidar <bobs at twft.com> wrote:

> Not that I have found. I had the same problem trying to use a datagrid as
> a spreadsheet. For one, hitting return in a spreadsheet will go to the cell
> below. In a datagrid, it doesn't. Also, you can scroll down as far as you
> like (within limits) in a spreadsheet, but a datagrid will only scroll as
> far as there is actual data, and you have to code a way to add new records.
> Simply clicking in the empty space below the last row does nothing.
>
> There are lots of ways that datagrids do not act like spreadsheets. It
> begs the question, is there room for another datagrid type? We have tables
> and we have forms. How about a third type? Spreadsheet? Just a thot...
>
> Bob
>
>
> On Jan 18, 2012, at 10:36 AM, Pete wrote:
>
> > I have a datagrid with three columns in it, col1 is not editable, col2
> > contains an option menu and is also marked as not editable, col3 is a
> > normal text column and is editable.
> >
> > If I double click on a cell in col3 to edit it, change the contents, then
> > press tab, the cursor stays in the col3 cell.  I would have expected it
> to
> > move to the next row of the datagrid, probably because I'm used to seeing
> > spreadsheets and word processing tables work that way.
> >
> > I can probably figure out how to make this work by writing some code in a
> > custom column behavior but thought I would check first to see if there is
> > some hidden datagrid property that makes this happen.
> >
> >
> > --
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list