Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
EvolvedDSM #1
First item from form to filtered datagrid not displayingimmediately
In my main application, I've got two components: One is a datagrid and the
other is a form. The datagrid has a filterFunction on it's dataprovider to
only show table records that match today's date. The form inserts the provided
fields to my db table, which should then populate within the datagrid
immediately after submission. The problem occurs on the first form submission
of the day when there are no results in the datagrid to begin with since it's a
new day. After submitting the first item, the datagrid remains empty. However
on my next form submission, the datagrid populates properly, displaying both my
first and second form submissions.
If I take the filter away and delete the records in the table as to simulate
an empty table (as the filtered tables begins at the start of the day), my
first form submission will display in the datagrid immediately without having
to add an additional record.
Here's my insert item code:
private var ds:DataService;
[Bindable]
private var entries:ArrayCollection;
[Bindable]
private var entry:recepLog; // recepLog is my .as file that contains all my
table fields
// populateRecep method is called at creation complete
private function populateRecep():void{
entries = new ArrayCollection;
ds = new DataService("recepds");
ds.fill(entries);
}
// createEntry() is called when the submit button is clicked
private function createEntry():void{
entry = new recepLog;
var currentDateTime:Date = new Date();
entry.clientName = clientNameInput.text;
entry.caseWorker = caseWorkerInput.text;
entry.actionRequired = actionRequiredInput.text;
entry.dateToday = dateDisplay.format(currentDateTime);
ds.createItem(entry);
resetForm();
}
// resetForm() is called from createEntry method
private function resetForm():void{
clientNameInput.text = '';
caseWorkerInput.text = '';
actionRequiredInput.text = '';
}
Notes: this application uses FDS with a coldfusion backend.
As said, the datagrid is only having trouble on the first submission of the
day, but then works great after additional entries. Any help is appreciated.
EvolvedDSM Guest
-
Selecting Item(s) on a DataGrid
Simple questions, couldn't find a simple answer however. I want to be able to select and item (and possibly later items) on a datagrid from the... -
Item Renderer in a Datagrid
I'm struggling with how to make a check mark ( image ) show up or not based on the value of some data in each datagrid line item. I'm using an item... -
DataGrid item selected
I tried : datagrid.selectedIndex = anyIndex and it does not work when is it possible to use this property ? is there some setIndex method... -
How to know if a datagrid item will be displayed in a datagrid with pagging
My problem is to know if a datagrid item will be displayed in a datagrid with paging. My dataset has hundreds of rows, of wich i'm only showing 5... -
Change style of a single row of the item list of datagrid, based on a field value of current item...
Sorry for the long subject guys, but I don't know how better I can resume the matter... Anyway, I have my datagrid showing items of an order. I...



Reply With Quote

