clickability in a DataGrid

Trevor DeVore lists at mangomultimedia.com
Wed Jan 23 07:31:53 EST 2013


On Tue, Jan 22, 2013 at 7:09 PM, Sieg Lindstrom <sl at trackandfieldnews.com>wrote:

>
> What I'd like to do (for Mac/Windows users) is include a DataGrid
> configured as, say, four columns of data followed by two columns that are
> the same in each row: one that reads "Delete" and one that reads "Edit."
> I'd like to set it up so that if the user clicks on "Delete" or "Edit" in a
> given row that then triggers handlers to either delete that row or edit the
> data contained in the other four columns of that row of the grid.
>
> Using a standard text field with tab-delimited data in each row, I'd use
> the ClickText and the ClickLine in the field script to determine what the
> user clicked and trigger the appropriate actions. How would one achieve
> this in a DataGrid?
>

Check out this page which has properties you can access in a cell:

http://lessons.runrev.com/s/lessons/m/datagrid/l/7345-template-custom-properties-messages

When the mouse is clicked you can check and see if the dgColumn of the
dgDataControl of the target has a value. Combine that with the dgLine of
the dgDataControl of the target and you get your row and column reference.

-- 
Trevor DeVore
Blue Mango Learning Systems
www.clarify-it.com    -    www.screensteps.com



More information about the use-livecode mailing list