Page 1 of 1
Overwriting data grid
Posted: Tue Jul 28, 2015 11:54 am
by croivo
How to overwrite certain cell in data grid if it's already filled with text?
Re: Overwriting data grid
Posted: Tue Jul 28, 2015 1:41 pm
by dunbarx
Hi.
Datagrids are complex. Changing the value of a "cell", whether already containing data or not, is not as straightforward as doing so in a field.
There are two ways, and you should read about each in the DG User Guide. Check out the "dgData" and the "dgText" properties. Write back if you have problems.
Craig Newman
Re: Overwriting data grid
Posted: Tue Jul 28, 2015 4:44 pm
by MaxV
I sugget you to read this:
http://livecode.wikia.com/wiki/Datagrid_API
It contains all properties and
hidden functions to work with datagrid.
A lot of them aren't in the dictionary.
Re: Overwriting data grid
Posted: Tue Jul 28, 2015 5:04 pm
by sritcp
croivo wrote:How to overwrite certain cell in data grid if it's already filled with text?
1. If you need to do it manually, then you can simply double-click on the cell (in a datagrid "table") and edit it.
2. If you need to do it by script, use either setDataOfIndex or setDataOfLine command, directed at the datagrid.
If you are giving this command from outside the datagrid script, then send this command by using DISPATCH or SEND.
For example,
Code: Select all
dispatch "setDataOfIndex" to group "myDataGrid" with tParameterList
where tParameterList is a comma-separated list giving the values: pIndex,pKey,pValue
The above commands are described in the datagrid user guide (link given in an earlier message on this thread).
Regards,
Sri
Re: Overwriting data grid
Posted: Tue Jul 28, 2015 7:38 pm
by dunbarx
either setDataOfIndex or setDataOfLine command, directed at the datagrid.
Sri is correct if you only want to change a single "cell" or a single line. Do practice all the suggestions. You will surely use them all.
Craig