Quantcast
Channel: LiveCode Forums
Viewing all articles
Browse latest Browse all 669

Getting Started with LiveCode - Complete Beginners • Datagrid (FORM)

$
0
0
Hi everyone,

Good day.

I'm practicing the datagrid (FORM) I'm trying to display all the data from my database using datagrid form but it display only the 1st record.

i tried using repeat i think there is wrong in my code. hope you can help me thanks in advance

here is my code

CODE:

command uiPopulatePeople   global gConnectionID   local tSQLStatement, tlist      put "C:\Users\CodeLemz\Documents\Zigzag project\ZigzagWeb\Picture/" into theImageFolder      put "SELECT * FROM sbcust " into tSQLStatement   put revDataFromQuery(tab,return, gConnectionID, tSQLStatement) into tlist      set the itemdel to tab         repeat for each line tLine in tlist            if item 1 of tlist is a number  then                 put item 2 of tlist into theDataA[1]["FirstName"]         put item 3 of tlist into theDataA[1]["Title"]         put theImageFolder & "close_window_48px.png" into theDataA[1]["Image URL"]      end if         end repeat         lock screen   set the dgData of group "DataGrid 1" to theDataA      ## Hilite first row   set the dgHilitedLines of group "DataGrid 1" to 1   unlock screenend uiPopulatePeople
datagrid_form.png

Statistics: Posted by lemodizon — Fri Jul 12, 2024 6:48 pm



Viewing all articles
Browse latest Browse all 669

Trending Articles