editing data grid column via scrip
bobsneidar at iotecdigital.com
Wed Feb 6 12:11:43 EST 2019
Not sure what you mean here. In the data grid tab of the properties window there is an option to Allow Editing. Double clicking the cell with this option set will allow you to edit the value.
This seems klunky to me. What I do is I create a field for each editable value in the datagrid, then have a closeField handler in the field do the updating of the datagrid record.
put the dgHilitedIndex of group "myDataGrid" into tHilitedIndex
put the dgDataOfIndex [tHilitedIndex] of group "myDataGrid" into aGridRecord
put the text of me into aGridRecord [myColumn]
set the dgDataOfIndex [tHilitedIndex] of group "myDataGrid" to aGridRecord
This then allows you to do some error checking and validation in the closeField handler. Use exitField instead to process your data each time the field loses focus.
> On Feb 5, 2019, at 14:31 , Hershel F via use-livecode <use-livecode at lists.runrev.com> wrote:
> Hi everyone, i searched high and low for this without success.
> Question, i have a data grid (trying to to set up an invoice form),
> columns, costumer_id, product_id, company_name, product_name, price. etc.
> option menus in product name and company name,
> Now when i use the options to select a product name, (product_name col.) i want to put the product id into the product_id column by selecting the option menu btn, i tried many ways even when it went in it didn’t show up in the send "printkeys" to group “data_grid_0” . all help would appreciate it.
> Thanks in advanced. Hershel F
More information about the Use-livecode