Groups | Blog | Home
all groups > flash data integration > june 2005 >

flash data integration : Datagrid for Data Entry?



madhavaram
6/29/2005 12:00:00 AM
Hello,

You can take the input from the textboxes or by using other components and after adding u can add to the datagrid component.

Thanks and regards,
WishingForAScreenName
6/29/2005 1:51:39 PM
I'm new to Flash, but need to build a web-based form to enter data using a
datagrid. For example, when employees in a department complete training, I
want to enter the training information (date, time, etc) in the top part of the
form, and then enter a list of employees that completed the training. Can the
datagrid control be used for this? Can somebody steer me to examples, or offer
suggestions for a better way to do this?

Thanks!

Robert
morfrance
7/14/2005 12:00:00 AM
Ok, when you'll have time to do it, just send me a mail to jc dot turin "at" conwy dot gov dot uk and I'll send U back the source code of what I've done.
morfrance
7/14/2005 11:20:55 AM
Hello,

Yes it could be a good thing to do with a DataGrid (that's what I am actually
doing for a project ^^).
You could too load the list of salaries into a ComboBox and then just have to
click on a button to add it into the DataGrid component.

Here is a code's sample :

//+++ Opening library we'll need
import mx.controls.gridclasses.DataGridColum ;
import mx.controls.DataGrid ;

//+++ Open accessibility
mx.accessibility.DataGridAccImpl.enableAccessibility() ;

//+++ Define some caracteristics of your Datagrid
myDataGrid.setSize(300,200) ;
//+++ Creation of the columns
var nameColumn:DataGridColumn = new DataGridColumn("A") ;
var commentColumn:DataGridColumn = new DataGridColumn("B") ;
//+++ Define some caracteristics of your Columns
nameColumn.width = 150 ;
commentColumn.width = 150 ;
nameColumn.headerText = "First Name" ;
commentColumn.headerText = "Comment" ;

//+++ Now we add columns into the datagrid
myDataGrid.addColumn(nameColumn) ;
myDataGrid.addColumn(commentColumn) ;

//+++ Now we create an event on the "Add Button"
add_btn.onRelease = function() {
add_to_datagrid()
}

//+++ Here is the function that will add the name of your employees into the
DataGrid
function add_to_datagrid() {
myDataGrid.addItem({A:name_list_cb.text,B:your_comment_txt.text}) ;
}


Hope it will help you,
Regards,
JC Turin
V_Dimitrov
7/14/2005 12:06:38 PM
When I run this I get an error message:
'mx.controls.gridclasses.DataGridColum' could not be loaded.
three times :(
WishingForAScreenName
7/14/2005 1:24:34 PM
Awesome!

morfrance
7/14/2005 1:32:27 PM
Wow, for my first contribution it worked ^^ Youpi! ;)
And V_Dimitrov, are you using Flash MX 2004, or Flash MX 2004 Professional ???
The second version is required to have an access to external library objects
(such as the Datagrid library).
If you have Flash Pro, then I'll have an other look on my code, but I think
it's that.

Regards,
JC TURIN
WishingForAScreenName
7/14/2005 1:37:22 PM
V_Dimitrov
7/15/2005 8:09:58 AM
Well,I am using Flash MX Professional 2004.
I guess I have to upgrade it with one of the upgardes of this site.
I hope it will work.
V_Dimitrov
7/15/2005 8:57:22 AM
I need help with my array.I want to load into it from a external text file, so
i do this:
myData = new LoadVars();
myData.onLoad = function(){

recipe_txt.text = this.Name1;
};
myData.load("1.txt");

This loads a variable into myData.So I want to place it in my DataGrid.
I tried this:
arr[0] = {Name:recipe_txt.text };
UserGrid.dataProvider = arr;


but it doesn't work.Please help me to load external variables into a
DataGrid.Thank you!


morfrance
7/15/2005 1:36:02 PM
try with :
morfrance
7/18/2005 12:00:00 AM
Have you named the occurence of your datagrid UserGrid ? If not, it's the
problem, if yes : take my source file on :
http://swimming.kolokanta.com/Sources/
The file is gala-coordinator.fla
May be you'll find some answer to your questions with a concrete project. (you
can use some datas manually into the combobox to test the add of values into
the datagrid)
See U!

JC Turin
V_Dimitrov
7/18/2005 9:16:50 AM
I'm affraid it is not working :(

//==========
myData17 = new LoadVars();
myData17.onLoad = function(){
recipe17_txt.text = this.Name1;
};

myData17.load("1.txt");
UserGrid.addItem({Name:recipe17_txt.text}) ;
//=====================
I use default DataGrid form the Component Panel,I don't touch anything in
it,may be that is the problem ?

AddThis Social Bookmark Button