Example code to populate a datagrid one line at a time
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Example code to populate a datagrid one line at a time
I want to press a button from card1 and add 1 entry (just text) into 3 columns on card2. I know how to write entries on the datagrid but i dont know how to add one, one at a time. If anyone has the time, plz write a simple example.
Re: Example code to populate a datagrid one line at a time
I always do this in the clear, extracting the contents of a dataGrid, manipulating that data, and restoring. It is possible to do this within the DG itself, I just don't.
That sort of thing. This will place that new text in the first three columns of a new row. I find doing it this way is easier for me, since I have complete control, via chunk expressions, of the process.
Craig Newman
Code: Select all
get the dgText of group "yourDataGrid"
put return & "AA" & tab & "BB" & tab & "CC" after it
set the dgText of group "yourDataGrid to it
Craig Newman
Re: Example code to populate a datagrid one line at a time
Yes thats it. Thank you. And one last question. How do i clear the whole datagrid?
Re: Example code to populate a datagrid one line at a time
Hi.
Same sort of methodology, except you do not need to move data out of the DG itself
Craig
Same sort of methodology, except you do not need to move data out of the DG itself
Code: Select all
set the dgData of group "yourDataGrid" to ""
or
set the dgText of group "yourDataGrid" to ""