Recently in Item Renderers Category

DataGrid With PopUp Editor

| 6 Comments

Some folks seem to be in need of an itemEditor in the DataGrid that can popup or float over the DataGrid. The DataGrid currently limits the editor to fit within its size and if you need more space than that, you'll need to popup an editor.

It is tricky to do so because of a bug in DataGrid plus the complexities of focus handlng and how it is normally used to end the edit session.

Here's a workaround for the bug and my take on how to create popup editors. Usual caveats apply.

Download Source
Run Example

DataGrid ItemEditor with Two Input Fields

| 4 Comments

Several folks have been asking about how to have a DataGrid ItemEditor with two input fields (say you want to separately edit first name and last name or something like that).

It's a bit tricky because of some missing pieces in the underlying Flash focus APIs and because of how Focus events work. Here is my take on how to do it. Usual caveats apply (i.e, code is not supported and may have bugs etc).

Download Source
Run Example

Flex 3 DataGrid Footers

| 26 Comments

I took a few minutes to prove that there is another way to add Footers to DataGrid in Flex 3. The old blog post showed how to add footers to the border. In Flex 3 we added more hooks so you can add other "content areas" to the DataGrid.

I'm short on time so the example isn't fully fleshed out. It could definitely use some optimization as to when and how often it refreshes. It probably needs masking if horizontal scrollbars are on, but at least it should show up in the right place relative to the horizontal scroll bar. There's probably bugs as well, so the usual caveats apply, but it should get you started in the right direction. Also, I did not try this with AdvancedDataGrid. It is actually developed by an entirely different team.

Download Source
Run Demo

CheckBox selection in DataGrid and List

| 46 Comments

Several folks have asked how to use Checkbox renderers to handle multiple selection in a DataGrid or List. There are some solutions out there already, but here's mine. Usual caveats apply.

Download Source
Run Demo

DataGrid Footers

| 42 Comments

Ever notice that the DataGrid has headers but no footers? That's because footers have to be computed if they are totals or averages or whatever and we wanted to leave that for advanced datagrids in a future release.

Lately, due to some other work we're doing for 3.0, I've been wondering whether footers, headers and locked columns and rows should be part of the chrome instead of the main set of cells. If so, it is possible to create footers in 2.0.1 today by subclassing DataGrid and making a special Border that can put renderers in the border.

Here's an example that computes the average of the price column. Usual caveats apply.

Download source

Run demo

You can see how one could do column headers that way, or add headers to Tree for a TreeDataGrid.

Now, if the renderers are in the chrome, they are not part of the selection model, and they should probably not renderer data from the dataprovider per-se. So I'd be interested in knowing:

1) If you have used lockedColumns or lockedRows today, what have you used them for?
2) Did you want the lockedColumns or lockedRows to be selectable? Editable?
3) Did you do this to get more header rows/columns or to display data from the dataprovider?

About this Archive

This page is an archive of recent entries in the Item Renderers category.

General is the previous category.

Presentations is the next category.

Find recent content on the main index or look in the archives to find all content.