Getting Started with DataGrid

Sannyasin Brahmanathaswami brahma at hindu.org
Thu Aug 2 11:48:15 EDT 2018


Thank Bob for the tips...

Actually this is  for a YouTube index, and all the "rows" would behave the same way.

The only thing changing on each row would be

1. https://i.ytimg/#########/hddefault.jbg (the thumbnail) 
2. Metadata for our date base (SQlite on the mobile app) Title, description. Etc. appear in a field.
3. Click on a row and drives the user to a Browser by setting the YouTube as the HTML source.

I am starting here:

https://livecode.com/docs/9-0-0/components/livecode-data-grid/

of a course a test stack..

What do you all think of  "A Slug on the Road"  Data Grid Helper?

Brahmanathaswami
 

On 8/2/18, 4:59 AM, "use-livecode on behalf of Bob Sneidar via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    I can give you a "not to do". DO NOT send selectionChanged to a datagrid in the middle of processing a selectionChanged message already. This will crash LC to desktop. 
    
    I have not used form style datagrids, which is what you are talking about methinks, but the idea is fairly simple. Instead of every row behaving exactly the same way, form datagrids allow each row to behave independently, as though they were individual "forms" stacked in a column. You change the look of the rows in the row behavior script, and alter the overall look of the rows by modifying the rowTemplate. 
    
    In the datagrid properties window data grid tab, change the style of the datagrid to "Form" and the options for editing these become available. The Row template is just a group so you can modify it like any other group. If you edit the script, you can see that there are already handlers defined, like fillInData, layoutControl etc. And since V9 other messages that can be used are in the left pane of the script editor to give you some idea on what you can do. 
    
    I would say open a new stack, drag a datagrid to it, change the type to Form and dig in. You cannot damage your existing project that way.  
    
    Bob S



More information about the use-livecode mailing list