Datagrid Bug?

Beat Cornaz B.Cornaz at gmx.net
Mon Jun 22 14:34:40 EDT 2009


Hi Trevor,

Trevor wrote :
.Is this a stock data grid with no code added or are there any of your
.scripts that are processing data that is entered?

It is a stock datagrid, with external scripts for retrieving the  
data. It has two label flds in the datagrid template, but they do  
nothing.
I have set the labels of the columns and disabled sorting of all  
columns but 2. I used the following script, which is placed in the  
grp "datagrid 3"
	
on SortDataGridColumn pColumn
    if pColumn = "SortNr" then pass SortDataGridColumn     --  
"SortNr" and "Klant" are column names
      if pColumn = "Klant" then pass SortDataGridColumn
end SortDataGridColumn


 >Out o fcuriosity, what is the sequence of events that requires  
closing the
 >editor by script rather than waiting to save until the user presses
 >return/enter or focus leaves the field?

Closing by script is a safety : after the user has entered data into  
the Datagrid, s/he goes back to the mainstack by clicking a button.  
If the user clicks this button without closing the last cell of the  
Datagrid (by pressing enter), then the script does that for her.

Thanks again for your help, Trevor. Really great !

Beat


More information about the use-livecode mailing list