Ultimate - The Renderer Initalized Event

clock May 23, 2011 08:50 by author Flexicious

For those of you who have skimmed through our docs, you'll probably know that our API for Ultimate is VERY extensive. On one recent occasion, we did a introduction session for one of our larger clients. It lasted close to three hours, and we only made it through all of the enable* properties on FlexDataGrid/FlexDataGridColumn. Hidden among the crowd, are little nuggets - like forcePagerRow (which makes the pagerRow showup regardless of whether or not you enablePaging), or (rebuild/redraw on Ultimate), or some of these methods. The rendererInitialized event is one such hidden gem, a handy little event that will help you in those rare corner cases that seem to have no built in property or example code.

From the docs:

"Dispatched when the renderer is initialized. Please note, any changes you made to the renderer stay in place when the renderer is recycled. So if you make any changes, please ensure that the changes are rolled back in the event handler first. For example, if you set the text to bold if a condition is met, then you should first set it to normal, check for the condition, and then set it to bold. This will ensure that if the renderer was previously used to display something that match the condition, and the current item does not, then we do not display bold text."

So basically - this is a catch all entry point for you to jump in, and pretty much do anything with the cell, right before its created and is ready for display. Rather similar to the regular item renderer's data set property, but gives you more control. It gives you a IFlexDataGridCell object, which has a rowInfo property, a column property, the level property as well as the grid property. We recently used this to set a custom tooltip on a cell.

For example:

protected function flexdatagrid1_rendererInitializedHandler(event:FlexDataGridEvent):void
            {
                 if(event.cell.rowInfo.isDataRow && event.cell.column){
                    if(event.cell.column.dataField=="name"){
                        event.cell["toolTip"]="Hello 1," + event.cell.text;
                    }else{
                        event.cell["toolTip"]="";
                    }
                }
            }

Oh - and another "good to know" item - the pager row (the toolbar) is fully customizable, for both Ultimate and Classic. The Classic examples basically ship with a custom version of the toolbar. For Ultimate, look at the demo, and scroll down to the bottom to find the "Styles Demo" where we demonstrate how to customize the pager bar.



Solution to AdvancedDataGrid Slow Performance with Column Groups and Scrolling

clock May 16, 2011 10:32 by author Flexicious

If you have not run across this already, the AdvancedDataGrid, and by extension the ExtendedAdvancedDataGrid have poor performance with large number of grouped columns. Another issue is that with really large column groups, you could not really set the width of the grid to a reasonable number. Yet another issue has been jumpy scrolling with the ADG. Since Ultimate has true smooth scrolling, it never had the problem with the width/scrolling. However, Up until 2.2, it shared similar performance issues. But never fear, 2.3 to the rescue.

Whenever you have a library that is used by a large number of developers, there are always corner cases that do not seem feasible at the very outset, but do turn out to be the exact pain point for some folks.

Well, we hit a corner case. Column Groups was a major addition to 2.2, and while they look pretty with and provide ability to group columns, they also come in very handy when you have a large number of columns. Prior to column groups, we had not really considered a case where you would have thousands or even hundreds of columns. Usually we see grids with a few dozen columns max. So, we never really bothered testing and optimizing for a very large number of columns.But in the past 2-3 weeks, we have had a number of folks come to us with this concern.

For those of you who like to know the internals, we do horizontal and vertical renderer recycling. But for the chrome area, we didnt do any. So if you have a 1000 columns, you are looking at creating 1000 cells. If you have 1000 footers, 2000 cells. You get the idea. Well, come 2.3, that's all changing! We've extended full renderer recycling to the chrome cells. So if you have a 100 columns, or a 1000, does not matter anymore.

An example of this will be added shortly. We've created a 1000X1000 table with column groups, The init delay is caused by the instantiation of the actual data ( a million calls to getrandom) but that should be asynchronous in a real world environment with the nice Flex wait clock. Also, newly added is a property to the columnGroup - enableExpand - draws a little expand collapse icon into the group. Nifty functionality. Watch this post for a live example to be uploaded soon.

Also - the driver behind this update is your feedback. You came to us with the issues you are facing, and we ended up providing a solution for it, so you can focus on your business problems, and not worry about stuff like this. This is a WIN-WIN, with our product improving, you getting an out of the box, enterprise ready built and tested component for a fraction of the cost it would have taken for you to build it yourself.

Update: Example link here. Please note, this is the latest development build, so we might have a few bugs, but we're planning on having a fairly polished build around the end of the month. Also, this demo requires Flash Player 10.2. We've made some optimizations where we leverage features only introduced in 10.2. These optimizations are turned on by default. This means, although Ultimate will work with as far back as FP9 (with the optmizations disabled), the demos do require FP 10.2.



Flexicious 2.2 Released!

clock May 2, 2011 09:02 by author Flexicious

 

It is with great pleasure, that we announce the availability of Flexicious 2.2 for our customers. This has been a major release, with numerous features being added to both our flex products, Flexicious Classic, as well as Flexicious Ultimate. The demo has been updated as well, so make sure to check it out. (You may need to clear your cache).

To streamline the process of receiving the latest build, we've setup a link where you can put in your information to receive a build. Please be sure to put in your purchase date in the notes, so we can lookup your information quickly. The updated samples can be downloaded directly from our demo page. Just right click over the flash swf, view source, and on the left hand side, you should notice a download project link. For those of you who are in the process of evaulating Flexicious - Please request a build using the trial download page, and we'll be glad to send it to you!.

There have been a LOT of changes in this build. In fact, this is probably our biggest build since last October. We had hunkered down in Q4 of last year and Q1 of this year building up Ultimate and SQLEDT, and we're quite glad to be able to get back into more frequent build cycles, including much needed feature enhancements to Classic. You will be seeing a lot more activity along all our product lines over the next few months, so be sure to keep watching!. One way to ensure you are notified of new builds/updates is to follow us on twitter or facebook. We post build notifications over there, and also push out messages about important blog posts.

That said, list of exciting features/enhancements/bugfixes/example code:

 

  • Enhancement (Classic/ Ultimate) to MultiSelectComboBox:
    • Added the “useTriState” property to the Multi Select Combobox. This will change the default behavior of the MultiSelectComboBox, as well as the Checkbox List and the CheckBox TileList. By default, setting the addAllItem property will cause the entire checkbox list to be preselected. Un-checking any of the checkboxes will cause the Tri-State checkbox to get into the middle state. Checking or Un-checking the Tri State box will check or uncheck all boxes.
    • Consolidated the common code between CheckBoxList and CheckBoxTileList
    • Added the tooltipFunction to the CheckBoxLists.
    • Added the “allItemText” property to all controls that support the addAllItem flag, to specify custom All Item text.
    • Modified the function that generates the “All” label to only select “All” when all the items are selected.
    • New Feature (Ultimate) : Column Groups:
      • Added the FlexDataGridColumnGroupCell,FlexDataGridColumnGroup class.
      • Added a new property to the FlexDataGridColumnLevel, groupedColumns, under which you can specify nested FlexDataGridColumnGroup objects, as well as contained columns.
    • New Feature (Ultimate)  : Drag and Drop:
      • Added built in support for Drag and Drop operations to Ultimate
      • Added the enableDrag, enableDrop properties to FlexDataGrid
      • Added the dragAvailableFunction, dragDropCompleteFunction, dropAcceptRejectFunction properties to customize the Drag and Drop behavior.
      • Added the dragRowData property that contains the data item for the row being dragged. Added the dragColumn property that indicates the column of the cell that initiated the drag.
    • New Feature (Ultimate): Multi Column Sort:
      • Added the ability for the user to interactively sort the grid by multiple columns.
      • Added a property, enableMultiColumnSort to Ultimate, that will show a number next to the sort Icon, clicking on which will open up the multi column sort popup.
      • Added the multiSortRenderer property, if you need to customize the Multi Column Sort popup renderer.
      • Added the multiColumnSortGetTooltip property, for you to control the tooltip when the user hovers over the number that indicates the sort order of the column in the grid.Enhancements (Classic/ Ultimate): Print/Export:
      • Added the “showColumnPicker” to PrintExportOptions. Setting this flag will make the controller skip the page and columns picker screen.
      • Added the “printContainer” property to PrintOptions. Before attempting to print, we add the print window to a display object container. This is required for the print datagrid to render. If set to null, we default to the parent of the grid being printed.
    • Enhancements (Classic/ Ultimate): Numerous Documentation updates to number of Ultimate as well as Classic Classes. More to come in future releases.
    • Enhancements (Classic/ Ultimate):  Loading Animation/Spinner Upgrades:
      • Added the Spinner to Ultimate. Introduced the Spinner Styles to Ultimate. Added the showSpinner() and hideSpinner() methods to Ultimate.
      • Added the spinnerFactory to Classic as well as Ultimate.
      • Added the Spinner Example, that demonstrates both the built in Spinner as well as a Custom Spinner
      • Added the ISpinner interface, for implementing custom spinners.
    • Enhancements (Classic/ Ultimate):  Upgrades to The Preference Persistence Mechanism:
      • Consolidated the common code in State Perisistence Include across all three Grids (ExtendedDataGrid,ExtendedAdvancedDataGrid,FlexDataGrid).
      • Introduced the UserSettingsController, UserSettingsOptions class, and the userSettingsOptionsFunction property.This allows you to have much more control over the Preference persistence mechanism. See the docs for the UserSettingsOptions class for more details. Moved the SaveSettingsPopup and SettingsPopup to the ClassicLib, to make it self contained and reuse in UltimateLib.
      • Added the useCompactPreferences property. This will reduce the size of the preferences string  from 25K characters (Verbose XML) to as little as 250 Characters (Optimized Custom String)
      • Added Support for Persisting Column Groups in Classic ExtendedAdvancedDataGrids as well as Ultimate.
    • Miscellaneous
      • Enhancement (Ultimate): Added the “wordWrap” property to the Ultimate FlexDataGridCell object.
      • Enhancement (Ultimate): Added the “displayOrder” property to the Ultimate FlexDataGrid object. A comma seperated list of the following strings: filter,header,body,footer,pager. Changes the order in which the grid displays the filter,header,body,footer,pager. The order in which the various sections of the grid are laid out.Defaults to pager,filter,body,footer
      • Bug Fix (Ultimate):Fixed an issue that caused the truncateToFit, useHandCursor,selectable, useUnderLine properties to not work on Ultimate.
      • Enhancement (Ultimate): Added the wordWrap, headerWordWrap, and footerWordWrap properties to FlexDataGridColumn.
      • Enhancement (Ultimate): Added the draggable property to FlexDataGridColumn
      • Enhancement (Ultimate): Added parameters to the showToolTip function of Ultimate to provide ability to control the positioning of the custom tooltip.
      • Enhancement (Ultimate): Changed the behavior of the "data" property setter of the DataCells, previously, the "data" setter was not being called if the data of the row was not changed, even if the refreshCell was being called. Now, the data setter will always be called if the client calls refreshCells()
      • Enhancement (Classic) : Added the column group header text to the exported columns.
      • Bug Fix (Classic/ Ultimate): Fixed a bug with the NumericRangeBox that caused the range to be min < value < max, instead now it will be min <= value <= max. Also, entering the same value in min and max will now filter out only the values that match the exact value entered.
      • Bug Fix (Classic/ Ultimate): Fixed issue when changing page size was dropping the filter values in Classic.
      • Bug Fix (Ultimate): Fixed an issue with Ultimate that caused the Footer formatting to be not carried over to the column print.
      • Bug Fix (Ultimate):Changed the default border color of Ultimate to match the cell lines.
      • Bug Fix (Ultimate): Fixed an issue with adding listeners to the level instead of the grid.
      • Bug Fix (Ultimate): Resolved an issue where expanding, collapsing and then expanding again and applying filtering caused a RTE on the next expand collapse operation..
      • Bug Fix (Ultimate): Resolved an issue where there header font did not pick up the color specified in the stylesheet.
      • Bug Fix (Ultimate): Fixed an issue where the status of the date combobox was being lost with the grid was rebuilt..
      • Bug Fix (Ultimate): Fixed the one pixel off border double border issue on Ultimate
      • Bug Fix (Ultimate): Fixed the issue where Ultimate grid would go blank after a print.
      • Bug Fix (Ultimate): Resolved a bug where resizing the second last column beyond the max possible resulted in the last column bleeding over.

 

  • New Examples Added:
    • New Example (Ultimate): Added the ShowOnHoverGrid example, to demonstrate various options available with the positioning of the Custom Hover over Tooltip.
    • New Example (Ultimate): Added the Drag Drop Grid example, that demonstrates how to control the drag drop mechanism, including what can be dragged, where it can be dropped and what to do when the drag drop operation is complete.
    • New Example (Ultimate): Added the SpinnerExample Grid example, the built in Spinner, as well as how to define a custom spinner.
    • New Example (Ultimate) : Added the Custom Report Example that demonstrates how to create a report using Ultimate. Demonstrates how to create your own Report Header, Report Footer, Page Header, Page Footer, as well as preset various print parameters.
    • New Example (Ultimate) : Added the styles demo example to show advanced skinning/styling properties of Ultimate.
    • Updated Example (Ultimate) : Updated the SimpleGrid, NestedGrid, as well as ColumnLockModes examples to demonstrate the new GroupedColumns as well as MultiColumnSort enhancements.