Overwriting data grid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Overwriting data grid
How to overwrite certain cell in data grid if it's already filled with text?
Re: Overwriting data grid
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
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
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.
It contains all properties and hidden functions to work with datagrid.
A lot of them aren't in the dictionary.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Overwriting data grid
1. If you need to do it manually, then you can simply double-click on the cell (in a datagrid "table") and edit it.croivo wrote:How to overwrite certain cell in data grid if it's already filled with text?
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
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
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.either setDataOfIndex or setDataOfLine command, directed at the datagrid.
Craig