DataGrid form versus table
Posted: Fri Sep 07, 2012 8:21 pm
I have successfully created Datagrid tables using an outside database. It uses tab-delimited information (actually, I modify the information once it reaches LiveCode to make it tab-delimited).
Now, I am trying to format them using Datagrid forms. And it doesn't work. I don't know why... Once it works in a table, I switch it to forms, then set up the row template and row behavior. That's all I do...
Then, to make me crazy, once it fails in Datagrid forms, it no longer works when I switch it back to a table - so I have to start all over again.
Here is the code that works in table, but not in forms:
global cx
put "http://mywebsite/forum.cfm?cx=" & cx & "" into turl
put url(turl) into theData_forum
replace "xyz" with return in theData_forum
replace "usetab" with tab in theData_forum
--add data
put false into firstLineAreNames
set the dgText[firstLineAreNames] of group "DataGrid top" to theData_forum
put the width of this stack into tStackWidth
put the dgDataOfLine[1] of group "DataGrid top" into theDataZ
if theDataZ["topic"] is empty then
put 1 into theLine
send "DeleteLines theLine" to grp "DataGrid top"
end if
What am I doing wrong?
Now, I am trying to format them using Datagrid forms. And it doesn't work. I don't know why... Once it works in a table, I switch it to forms, then set up the row template and row behavior. That's all I do...
Then, to make me crazy, once it fails in Datagrid forms, it no longer works when I switch it back to a table - so I have to start all over again.
Here is the code that works in table, but not in forms:
global cx
put "http://mywebsite/forum.cfm?cx=" & cx & "" into turl
put url(turl) into theData_forum
replace "xyz" with return in theData_forum
replace "usetab" with tab in theData_forum
--add data
put false into firstLineAreNames
set the dgText[firstLineAreNames] of group "DataGrid top" to theData_forum
put the width of this stack into tStackWidth
put the dgDataOfLine[1] of group "DataGrid top" into theDataZ
if theDataZ["topic"] is empty then
put 1 into theLine
send "DeleteLines theLine" to grp "DataGrid top"
end if
What am I doing wrong?