if i can suggest a slightly different approach, how about using a kind of adapter to acheive what you are after:
in quick & dirty code:
<mx:DataGrid dataProvider="{adaptDP(theData)}">
  <mx:DataGridColumn dataField="name"/>
  <mx:DataGridColumn dataField="value"/>
</mx:DataGrid>

private function adaptDP(inArr:Array):Array{
  var outArr:Array =[];
var total:Number = 0
 for (var i:Number=0;i<inArr.length ;++i){
 total += inArr.value;
outArr.push(inArr[i]);
}
outArr.push({name:"Total", value:total})
return outArr;
}

this of course wont help with the sorting thing, but Im sure you could work a way around that too if you needed it...


On 7/27/06, flxcoder <[EMAIL PROTECTED]> wrote:

Thanks for the advice. I think I might look into setting up a data
provider for a day and see how far I can take it. I have seen another
example today of coloring row backgrounds so that will be useful.

The product demo you have out there is pretty impressive. Is it for
sale/development? I guess you are planning on mktg to developers.
good work!

--- In flexcoders@yahoogroups.com, "Anatole


Tartakovsky" <[EMAIL PROTECTED]> wrote:
>
> Depends on the number of objects/customization needed .
>
> Stacking things manually is going to be quick and efficient - you
will have
> working grid in a day
> You can have 100 working grids in 4 month
>
> Manipulation of data provider is less obvious. WIll take you at
least few
> weeks to work out "static" solution
> Making it fully dynamic with grouping/sorting/filtering is a bit
tedious.
> Here is what you can do with dataProvider approach:
> http://derby.faratasystems.com/fxReporter/presentation/
presentation.html
>
> Sorry, the live demo is available for Beta 3 player only -
commercial
> version will be released "second half of 2006"
>
> Thank you,
> Anatole
>
>
>
>
> On 7/27/06, flxcoder <[EMAIL PROTECTED]> wrote:
> >
> > any advice on this. i am plan to start work on this today. i
have
> > seen examples of creating editable datagrids that have subtotals
at
> > the end of the column - so i know its possible by working only
with
> > the data provider and letting the datagrid handle just the
display.
> >
> > so is it advisable to stick with one grid only and keep showing
> > subtotals on the lines or create multiple grids and stack them
> > together.
> >
> > Thanks.
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,

> > "flxcoder" <flxcoder@> wrote:
> > >
> > > This topic is similiar to what I am looking for. A datagrid that
> > has
> > > say 10 rows with the 3rd and say the 7th row showing subtotals
and
> > > the 11th row showing the grand total.
> > >
> > > From what I read in this conversation thus far, it seems that
the
> > > solution is to create multiple datagrids and calculate the
totals
> > > from the dataproviders.
> > >
> > > So in the case that i described above, am i right in assuming
that
> > i
> > > will need 5 datagrids with 4 of them having their headers cut
off,
> > > all lined up and pretty.
> > >
> > > am i heading in the right direction or is there a better way.
> > >
> > > Thanks.
> > >
> > > --- In flexcoders@yahoogroups.com
<flexcoders%40yahoogroups.com>, "Lisa

> > Nelson" <ltwede@> wrote:
> > > >
> > > > By the way on the background color. That was dumb. I was only
> > > > displaying the column headings of my totals datagrid.
> > > >
> > > > -----Original Message-----
> > > > From: flexcoders@yahoogroups.com
<flexcoders%40yahoogroups.com>
> > > [mailto:flexcoders@yahoogroups.com
<flexcoders%40yahoogroups.com>] On
> > > > Behalf Of Lisa Nelson
> > > > Sent: Friday, July 07, 2006 8:21
> > > > To: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
> > > > Subject: RE: [flexcoders] Re: DataGrid Totals Row
> > > >
> > > > I tried that after I saw your message. That didn't help.
> > > >
> > > > Here's what else is funky. I can't seem to change the
background
> > > color
> > > > of the totals datagrid. All I can figure is somehow the fact
> > that
> > > it
> > > > only has 1 row affects it. You can see the problem in design
> > view,
> > > and
> > > > also at run-time.
> > > >
> > > > --Lisa
> > > >
> > > > -----Original Message-----
> > > > From: flexcoders@yahoogroups.com
<flexcoders%40yahoogroups.com>
> > > [mailto:flexcoders@yahoogroups.com
<flexcoders%40yahoogroups.com>] On
> > > > Behalf Of Tom Chiverton
> > > > Sent: Friday, July 07, 2006 8:02
> > > > To: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
> > > > Subject: Re: [flexcoders] Re: DataGrid Totals Row
> > > >
> > > > On Friday 07 July 2006 15:37, Lisa Nelson wrote:
> > > > > I am pretty new to Flex. But I thought what you wrote would
> > bind
> > > to
> > > > > the width of the overall grid, not the individual column
widths.
> > > >
> > > > It would, yeah :-)
> > > > I'm guessing you have to bind both the overall width and all
the
> > > columns
> > > > to make it work.
> > > >
> > > > --
> > > > Tom Chiverton
> > > >
> > > > ****************************************************
> > > >
> > > > This email is sent for and on behalf of Halliwells LLP.
> > > >
> > > > Halliwells LLP is a limited liability partnership registered
in
> > > England
> > > > and Wales under registered number OC307980 whose registered
office
> > > > address is at St James's Court Brown Street Manchester M2
2JF. A
> > > list
> > > > of members is available for inspection at the registered
office.
> > Any
> > > > reference to a partner in relation to Halliwells LLP means a
> > member
> > > of
> > > > Halliwells LLP. Regulated by the Law Society.
> > > >
> > > > CONFIDENTIALITY
> > > >
> > > > This email is intended only for the use of the addressee named
> > > above and
> > > > may be confidential or legally privileged. If you are not the
> > > addressee
> > > > you must not read it and must not use any information
contained
> > in
> > > nor
> > > > copy it nor inform any person other than Halliwells LLP or the
> > > addressee
> > > > of its existence or contents. If you have received this email
in
> > > error
> > > > please delete it and notify Halliwells LLP IT Department on
0870
> > 365
> > > > 8008.
> > > >
> > > > For more information about Halliwells LLP visit
> > www.halliwells.com.
> > > >
> > > >
> > > >
> > > > ------------------------ Yahoo! Groups Sponsor ---------------
----
> > -
> > > ~-->
> > > > Great things are happening at Yahoo! Groups. See the new email
> > > design.
> > > > http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
> > > > ----------------------------------------------------------
> > --
> > > ~->
> > > >
> > > > --
> > > > 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




__,_._,___

Reply via email to