Hej Klaus,

Many thanks for the tip and the link to the datagrid manual as PDF. I used too 
much shorthand in describing my desire to "edit" the content of the row. I'm 
trying to duplicate an admin tool that runs in Javascript on a server. The 
Javascript is a black box to me; I'm just trying to duplicate the 
functionality, so I don't want the user to have to edit rows in the datagrid, 
but rather select a row to edit, and then the editing will take place on a 
different card set up to mimic fields and buttons in the old admin tool.

Now I'm on the right track. Thanks.

Sieg Lindstrom

On Jan 23, 2013, at 10:00 AM,  Klaus on-rev wrote:

> well, DataGrids are extremely complex but also extremely powerful once you 
> get to "master" them (more or less :-)
> 
> OK, presumed you have a datagrid of type TABLE with a column named "delete" 
> and when the user clicks on that column
> you want to delete the complete row of the datagrid, right?
> 
> Deleting ->Put this into the datagrids script:
> 
> on mouseup
> 
>  ## WHAT column has been clicked?
>   put the dgColumn of the target into tClickedColumnName
> 
>  ## User clicked the column "delete":
>   if tClickedColumnName = "delete" then
> 
>   ## Better ask EVERYTIME! ;-)
>      answer "Really delete?" with "Cancel" or "OK"
>      if it = "Cancel" then
>         exit to top
>      end if
> 
>     ## get the currently selected row
>      put the dghilitedLines of me into tHL
> 
>    ## Now let the DG do the deletion
>      dispatch "DeleteLines" to me with tHL
>   end if
> end mouseup
> 
> EDITING is definitively implemented in the default datagrid, just check 
> "editable" in the inspector for the datagridand doubleclick 
> any column to edit iits content. Or did I misunderstand your question about 
> editing?
> 
> Get the complete datagrid manual as PDF here:
> <http://lessons.runrev.com/m/datagrid>
> 
> Work through the example to get the grips.
> I must confess that I need to re-read the docs everytime I did not work with 
> DGs for more than one week, just too complex stuff :-D
> 
>> Sieg Lindstrom
> 
> Best
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> kl...@major.on-rev.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to