Page 1 of 1
using a datagrid as a manual data table
Posted: Sat Jan 09, 2010 9:15 pm
by astacus
I think I understand a bit about datagrids, but what I'd really like is th ability to use it as a device to allow entry of data in column,row format, for further processing, purely during that instance of the data.
User enters data, completing all cells in each row
user processes data via a button
programme performs analysis of tabulated data in datagrid
The reason why I like the datagrid is because it does things like headers and automatic sorts.
However, if I create an empty datagrid, it seems as though it is not possible to manually enter data. I suspect I am doing something wrong with the properties (I select editable though).
All help appreciated.
Rob
Re: using a datagrid as a manual data table
Posted: Mon Jan 11, 2010 5:07 pm
by trevordevore
Responded to same message sent to mailing list.
Re: using a datagrid as a manual data table
Posted: Thu Jan 14, 2010 11:03 pm
by ecflyer
Any chance to get the response to this question or forward me the email? I would like to allow the user to have the option of putting data in the DG manually as well as through the addData/AddLine script. The manual entry should be limited to only being able to add data to the next row. I can get it to work if I create a fantom row by setting theDataA data to empty, but have not found a practically way to make it work consistently.
thanks,
Eric
Re: using a datagrid as a manual data table
Posted: Thu Jan 14, 2010 11:04 pm
by ecflyer
Re: using a datagrid as a manual data table
Posted: Thu Jan 14, 2010 11:51 pm
by trevordevore
Here is the email response from the list.
> 1. User enters data, completing all cells in each row - this will be checked for in program
> 2. User processes data via a simple button, such that...
> 3. Program performs analysis of tabulated data in datagrid
> 4. Data is volatile, and is lost when program quits
If you don't want to permanently store data in the Data Grid you can uncheck the "persistent data" checkbox in the General Property Pane for a Data Grid or you can set the property directly:
set the dgProps["persistent data"] of group "DataGrid" to false
> The reason why I like the datagrid is because it does things like headers and automatic sorts very easily.
> However, if I create an empty datagrid, it seems as though it is not possible to manually enter data. I suspect I am doing something
> wrong with the properties (I select editable though).
A Data Grid allows users to edit existing information if it the Data Grid is editable. You can add records using script. This might be done with a "+" button somewhere in your UI. Here is a lesson that shows how.
How Do I Add A Row Of Data To An Existing Data Grid?