Tracy
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Thomas Ott
Sent: Monday, April 24, 2006 5:23 AM
To: flexcoders@yahoogroups.com
Subject: AW: [flexcoders] Re: update Datagrid but stay in edit mode (Flex 1.5)
Ok, I use the dataProvider API method "editField" to update the values. Now I don't have to reassign the dataProvider and the focus is still on one of the cells. So far so good
But the fields, even the one I just edited, stay empty.
I use labelFunctions on the fields to format the numbers
When I use the labelFunction
function lblFuncNumber(item:Object, colName:String, dec:Number):String
{
return Str.formatNumber(item[colName], dec);
}
....
static function formatNumber(value:Object, dec:Number):String
{
var f:NumberFormatter = new mx.formatters.NumberFormatter();
f.precision = dec; // Nachkommastellen
f.thousandsSeparatorTo = "'";
return f.format(value);
}
the fields are empty
but when just I use
function lblFuncNumber(item:Object, colName:String, dec:Number):String
{
return item[colName];
}
the numbers show up in the cell.
Can someone help me?
Thomas
vertical ag
Leutschenbachstrasse 48
8050 Zürich-Oerlikon
+41 43 299 77 27
-----Ursprüngliche Nachricht-----
Von: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Tracy Spratt
Gesendet: Freitag, 21. April 2006 19:26
An: flexcoders@yahoogroups.com
Betreff: RE: [flexcoders] Re: update Datagrid but stay in edit mode (Flex 1.5)
Also, how are you "updating the dataProvider"? You should be using the
dataProvider API, and not the low level array methods.
Tracy
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of bhaq1972
Sent: Friday, April 21, 2006 3:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: update Datagrid but stay in edit mode (Flex
1.5)
if you want to set focus on an editable cell, just use focusedCell
property. eg
dg.focusedCell = {itemIndex:1, columnIndex:1}
--- In flexcoders@yahoogroups.com, "Thomas Ott" <[EMAIL PROTECTED]>
wrote:
>
> Hi everyone
>
> I have a Datagrid with editable cells. Pressing tab or enter key
while
> editing a Cell, calls the function updateTotal which calculates
other
> non-editable fields in the grid and updates the dataProvider. The
> problem is now, that the non-editable values dont show up in the
grid,
> although there present in the dataProvider
>
> dg.invalidate() never worked.
> reassigning the dataprovider or using editField made the values
show up,
> but the cell lost focus
>
> How can I update the cells with the celleditor staying active?
>
>
> Thomas
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.