Expand my Community achievements bar.

SOLVED

custom roster

Avatar

Level 3
I am coding a more custom roster in my app. Looking at the
examples provided there a couple of ways to do. Although looking at
the roster pods there seems to be alot of code needed.



What do you think is the best may to approach to it? I was
looking at possibly an arraycollection or a more direct approach of
using the user discriptor as the data provider(if that can be
done).



Of course it has to uodate as user come and go. Here is my
code.
1 Accepted Solution

Avatar

Correct answer by
Former Community Member


Hi ukkpower,



As for the arrayCollection to supply the dataProvider,
userCollection is already an arrayCollection and can be used as the
dataprovider of your grid directly. From there, you can have your
itemRenderer access the customFields data like so :



data.customFields.LocationName



hope that helps

nigel

View solution in original post

3 Replies

Avatar

Former Community Member
Hi,



This is really a flex question detail. You can ask in flex
forum about details of headerRenderer and itemRenderer in
DataGridColumn. You can either use userDescriptors or create your
own object like what you are doing.



As far as my knowledge goes,

If you assign certain object to the dataProvider of DataGrid,
and column's dataField having a property of that object , then the
renderers will have that property as the 'data' inside it. This
data could be a single string/int or could be complex object
depending on what it is.

Hope this helps. Please see flex forum and flex docs for more
details.



Thanks

Hironmay Basu

Avatar

Correct answer by
Former Community Member


Hi ukkpower,



As for the arrayCollection to supply the dataProvider,
userCollection is already an arrayCollection and can be used as the
dataprovider of your grid directly. From there, you can have your
itemRenderer access the customFields data like so :



data.customFields.LocationName



hope that helps

nigel

Avatar

Level 3
Perfect, that was exactly what I was wondering. It all work
brilliant now. I used the usercollection as the dataprovider and
then used data.displayname etc.



Thanks
The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----