Actionscript 3 :: Flex 4.5: Spark DataGrid With Custom ItemRenderes

Jan 31, 2012

Firstly sorry for the really lengthy question. I am trying to implement an Org.Chart using spark DataGrid. The data for the Org.Chart does not change and hence I am hard coding the values. I had to implement this Org.Chart as I need to have floating Nodes and also the connecting lines should be drawn a bit different when compared to using an external component. Please find the following image of which Im trying to achieve: Here is the idea:

[Code]...

View 1 Replies


Similar Posts:


Actionscript 3 :: Get Column Index In Custom Itemrenderer For Spark Datagrid

Jan 16, 2012

I am trying to use the same custom renderer for all the columns in a spark DataGrid. I need to know the dataField or columnIndex based on which I can change state in my custom itemrenderer.

Earlier in mx:DataGrid, this can be achieved by extending the MXDataGridItemRenderer which implements IDropInListItemRenderer and hence dataGridListData property is available.

But using the spark DataGrid, I am extending the GridItemRenderer which DOES NOT implement the IDropInListItemRenderer and hence unable to access dataGridListData property. I have tried to write an action script class extending GridItemRenderer and implementing dataGridListData but flex throws an error in the set function of this variable.

// Sample itemRenderer used for mx:DataGrid [Working Code]
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;

[Code]....

View 1 Replies

Flex :: Datagrid Selects The Wrong Custom Cell In Datagrid

Mar 15, 2010

I am working on a problem since a week soon, but I still couldn't make it work as expected. I have a DataGrid which has HBox with a CheckBox an a Label as itemRenderer (see Code below). When I tap in to the Cell the standard itemEditor pops up and lets you enter the content of the label. Thats the standard behavior. I works fine except for 2 problems:

If I enter to much text, the horizontal srollbar pops up, and the cell is filled with that scrollbar. As you see I tried to set the horizontalScrollPolicy to off, but that doesnt work at all... I tried to do that for all the different elements, but the failure is still existent. When I have filled more than one row, there is an other mistake happening. If I tap on a row, the datagrid selects the one below that row. That's only if one line is already selected. If I tap outside the datagrid and then, tap at any row the itemEditor of the right row will show up... Is there anything now wright in the setup of my set data method?

package components
{
import mx.containers.HBox;
import mx.controls.CheckBox;

[Code]......

View 2 Replies

Flex :: Communicating Between Itemrenderes In A Single Row

Mar 21, 2010

I have a datagrid with an XML object as dataprovider. There are 2 columns in the datagrid which have comboboxes as their itemrenderers. The rendereriseditor property is also marked true. These itemrenderers are defined in their own mxml files. What i want is if the user selects a particular item in the combobox, say NA, then the value of the other combobox should also become NA.

View 1 Replies

Flex :: Spark's DataGrid CalculateDropIndex Equivalent?

Mar 10, 2011

Is there any function (or any easy way to implement it) equivalent to calculateDropIndex for spark's DataGrid?

(using Flex Hero 4.5.0.19786)

View 1 Replies

Flex :: Spark DataGrid Cell Click?

Jun 18, 2011

I am searching for something like CellClick event on Spark DataGrid, or something alike.

Is there something like this in Flex 4.5, and how to get the data from the clicked cell ?

View 1 Replies

Flex :: Disabling Few Rows In Spark Datagrid?

Sep 1, 2011

Is there a way in spark datagrid to disable some rows programmatically, in flex 3, it could be done using the function mouseEventToItemRenderer this way:

override protected function mouseEventToItemRenderer (
event: MouseEvent): IListItemRenderer {
var listItem: IListItemRenderer;// = super.mouseEventToItemRenderer(event);

[Code]....

And then I implement the function disabledRow to return true or false depending on some condition, the condition that will specify if the selected item will be renderered or not. Is there a way in spark datagrid to do the same?

View 2 Replies

Flex :: Set A Tooltip Just On Header Of A Spark Datagrid?

Sep 21, 2011

Is it possible to set a tooltip just on the header of a spark datagrid. I do not want any tooltips on the data - just the header. I have played with mouse over and this sort of looks like it might work. This seems a bit of a hack to me though.

View 1 Replies

Flex :: RendererAdd Function For Spark DataGrid?

Sep 23, 2011

Like we have rendererAdd function/hook for a Spark List which is dispatched when an itemrenderer is added to the container? Do we have any similar method/hook at DataGrid level also?

View 1 Replies

Flex :: Spark DataGrid Alternative Row Color Changes?

Nov 19, 2011

How to Set alternat Row Color In Flex 4.5 MobileApplication For Spark Data Grid. The Main Problem Of SparkDataGrid in Mobile Application not Allowed to Add Skin.

View 2 Replies

Flex - Spark Datagrid Editor - Numbers Only?

Jan 14, 2012

I want a spark datagrid that allow a user to input numbers only. They can only input number with up to 5 decimal places. I am struggling with this in Spark. I can do it in Flex by using the itemEditEnd parameter of the MX DataGrid.

How do I do this is Spark? Any pointers would be great.

View 1 Replies

Flex :: How To Get ItemDoubleClick Event In Spark DataGrid

Mar 7, 2012

Recently I am working with Spark DataGrid. Before I was using AdvancedDataGrid. In that I was capturing itemDoubleClick event. But I am not able to find such a event in SparkdataGrid. So I want to capture double click event on single row of DataGrid. Some people told that, I have to use my custom ItemRenderer to do that. But is there any way to capture itemDoubleClick event in Spark DataGrid without creating custom ItemRenderer ???

View 1 Replies

Flex :: Datagrid - Display A Multi-line Column Header Using The Flex Spark Data Grid?

Apr 13, 2011

How can you display a multi-line column header using the Flex Spark Data Grid for Flex 4.5?

View 5 Replies

Flex :: Move/reorder Columns In A Spark DataGrid?

Apr 6, 2012

I am unable to find if the spark DataGrid supports moving / reordering the columns. If not what could be the best solution? Maybe using the mx version?

I want the user to be able to drag the columns and arrange them.

View 2 Replies

Flex :: Spark Datagrid With Checkbox Does Not Update Correctly?

May 26, 2011

The checkboxes are updated correctly when I select one or more datagrid rows but when I select a checkbox for the first time the checkbox does not refresh until the pointer moves out of the datagrid row. How can I fix this?

[Code]...

View 3 Replies

Flex :: Set The Selection Border Color In Spark Datagrid

Jun 29, 2011

I have a custom skin applied to a Flex 4 spark datagrid. One really annoying issue I am having is finding the ability to override or change the selected row border color. I was able to set the selectionColor just fine but the border is still the default light blue color. I need it to be yellow.

Anyone know where I can find this style or override this border that is being set when selection happens within the skin itself.

View 2 Replies

Flex :: Transparent Background On Spark DataGrid Headers?

Jul 14, 2011

I almost got it, but the part that's giving me trouble is making the header background transparent. I am making a custom MXML skin based on the default Spark DataGrid skin. I tried setting the contentBackgroundAlpha to 0 on the columnHeaderGroup and the headerRenderer, but that didn't work. I tried setting visible to false for either of those, but that made it so that the text didn't show up either, so that didn't work. There is no setting for backgroundAlpha in either of those two, so I'm not sure what else to try.

View 2 Replies

Flex :: Programmatically Set Edited Cell On Spark Datagrid?

Jul 24, 2011

What is the equivalent of editedItemPosition for the Spark datagrid?

View 1 Replies

Control A Spark Datagrid's Scroller Position In Flex?

Aug 22, 2011

I'm using the new Spark Datagrid for a project, but I must confess the scroller is annoying me a little bit, so I would like to have some control over it.

View 1 Replies

Flex :: Print Flex Spark Datagrid By Using The Mx PrintDataGrid?

Oct 4, 2011

Flex 4.5+ is I guess everyone is working on nowadays so I asked this question since I haven't yet find working both spark datagrid and the mx printdatagrid components together.
What I'm trying to achieve is to print all the data inside my spark datagrid. So when I do my research, we use the PrintJob or the FlexPrintJob classes.It works fine but when I need to print multiple pages since the data on my spark datagrid is quite long, I can't somehow find a way how to do it.The print output is only upto where the height of my spark datagrid.So in my research, they somehow managed it to use the mx:PrintDataGrid component.But sad to say, they did it with an mx:DataGrid also.how to use the mx:PrintDataGrid along with s:DataGrid.

var printJob:PrintJob = new PrintJob();
if (printJob.start())
{[code]....

If converting a spark datagrid columns to the mx datagrid columns is not possible, is there a way that I can print all the data on the spark datagrid using multiple pages?

View 1 Replies

Flex :: Sorting - 4.5 Spark Datagrid Multi-column Sort?

May 9, 2011

does anyboy know if Flex 4.5 Spark Datagrid suppoprts multi-column sort natively - just like the ADG does?

View 2 Replies

Flex :: Spark Datagrid Memory Usage With Dynamic Columns?

Jun 4, 2011

I have a question about the Spark DataGrid and how it works in terms of garbage collection. What I'm finding is that if I dynamically add and remove columns from the DataGrid at runtime, the GridColumns and ItemRenderers never get freed from memory.

For instance, if I have a list with 10 items and I create 10 columns, there will be 100 ItemRenderers and 10 GridColumns. If I remove all of the columns, they are still there.

[Code]...

View 2 Replies

Flex :: Spark Datagrid Fixed Column, Horizontal Scrolling?

Jul 11, 2011

How can I make my datagrid have its first column fixed and scroll the reset horizontally and vertically?

View 1 Replies

Flex :: Scale A Spark DataGrid With Fixed RowCount & No Scollers?

Nov 1, 2011

I am trying to find a way to Scale (either font or scaleX&Y) a DataGrid (with equestedMinRowCount = requestedMaxRowCount = requestedRowCount = dataProviderLength), so that it would Always show all the Rows (so no scrollers).Solution I came up with for Scaling is:

protected function thisDatagrid_resizeHandler(event:ResizeEvent):void
{
if (event.oldWidth < this.width) {

[code]......

View 2 Replies

Flex :: User Interface - Spark Datagrid And Word Wrapping

Nov 18, 2011

I would like to have a spark datagrid that wordwraps all rows where relevant. At the moment it appears like the width of a cell is dependent on the contents of the first row and then subsequent rows are word wrapped. For example:

[Code].....

How can I get the datagrid to dynamically resize to 100% of the container width and for wordwrapping to happen on all rows? (not just rows after row 1)

View 1 Replies

Flex :: Spark DataGrid Disable Horizontal Scroll And Resize Columns?

May 10, 2011

Is there a way to get the columns to resize to the width of the new Datagrid instead of overflowing and showing the scrollbar? I've tried on the skin, setting all relevant properties and ran out of options. I just want it to behave like the previous Datagrid where the columns would resize to the width of the datagrid.

View 1 Replies

Actionscript 3 :: Limit Flex Spark DataGrid ItemRenderer Data To Column

Feb 27, 2012

I've got a DataGrid in my mobile application (I know, I know but there's currently not other solution for this), that numeric values. Depending on the value of a cell, the text gets colored. My big issue is that this doesn't work very for more than about 5 rows of data. I reckon the issue is that the set text function (in which I format the color) can't keep up with the amount of cell changes and formats the text based on the last updated cell of the row.I thought about a column item renderer so that the renderer only gets the value for that column, and not the whole data of the row.

Just for reference, this is my current item renderer (again, this works fine for few rows, for 5+ of fast changing data, this doesn't work any more, cells get formatted even though their data hasn't changed).[code]I just double-checked and have to revert my previous statement. A single row works fine, the second row already messes up the color formatting though. It seems as if the datagrid somehow throws together the values.
Doing the color formatting in the set data method shows the exact same effect;[code]My assumption about the grid messing up the ItemRenderer's data seems to be correct.A simple trace in the set data method (trace("old: " + _oldVal + "new : " + value[column.dataField]);) revealed that somehow, values of the next grid row (in case there are 2) get used as well as _oldVal gets the old value of the next row.

View 1 Replies

Flex :: Add A Spark Component To A Mx Extended Custom Itemrenderer?

Nov 14, 2010

have been working on an air app for quite some time and in one of my mx:lists i have a custom renderer written in pure AS (no mxml). it extends the listitemrenderer mx componenet. in it i have overrode the createChildren() function to add some children of my own.

now, fort right-to-left text i want in this itemrenderer, i would like to add a spark:TextArea component in this createChildren() function

is there a way to do so?

this is the itemRenderer:
import flash.text.TextField;
import mx.controls.listClasses.ListItemRenderer;

[Code].....

View 2 Replies

Flex :: How To Add Spark List Item Custom Properties

Jan 3, 2011

I'm trying to make a simple flash application providing interface for taking tests as a high school assignment. One of the requirements is to use an XML file as data source.Now, having a List component bound to the XML file with questions consisting of data such as question body, question type (ie. single choice, multiple choice, open, image etc.) and possible answers (where applicable), I was wondering if I could add some additional data (and what is the best possible way to do so) to each question upon its transfer to the List component.

I am trying to achieve two main goals with this: firstly, to mark the questions to which an answer has already been given, like with such code in ItemRenderer class:
<s:Label color="{data.color}" text="{data.label}"/>
Where data.color would be set whenever the user gives an answer to a question.
Secondly, while at it, I thought of such possibility as a great way to store answers given to particular questions. In this case, the Class of the answer object would have been Object, since there has to be many type of questions (where the answer could also be a Bitmap for example).

View 2 Replies

Actionscript 3 :: Flex 4.5 Spark DataGrid - Detect Column Clicked In SelectionChange Handler

Apr 23, 2011

I have a spark datagrid with selectionMode="multipleRows".

I have three columns in the datagrid. I don't want the row selection to happen when the user's click falls on the third column of a row.

The row selection should happen only when one of the first two columns is clicked. How do I achieve this? There is a selectionChanging event for the datagrid, but the GridSelectionEvent object received in the handler does not seem to provide any information about the column on which the click happened.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved