itemrenderer

Datagrid selects the wrong custom cell in my datagrid

爱⌒轻易说出口 提交于 2019-12-24 21:40:10
问题 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

Flex3: Custom Item Renderer does not listen to events dispatched by parent

偶尔善良 提交于 2019-12-24 06:21:05
问题 I have a List with a custom ItemRenderer. The ItemRenderer contains a Checkbox and a Label. The component with the List has a 'select all' checkbox. When the 'select all' checkbox is checked, it dispatches an event that each item should listen to in order to select its own checkbox. The eventlistener is added on creationComplete of each item, and the event is dispatched correctly when the 'select all' checkbox is selected, but the listener in the custom ItemRenderer does not listen. How do I

How can I get the ItemRenderer of a Flex Spark List from its DataProvider Object?

試著忘記壹切 提交于 2019-12-23 12:28:58
问题 In Flex I can create an ItemRenderer to represent each item in the Lists DataProvider but how do I access the instance of the ItemRenderer via the DataProviders Object? Something like myList.getItemRenderer(dp.getItemAt(10)); 回答1: public function getItemRenderer(list:List, item:Object):ItemRenderer { var dataGroup:DataGroup = list.dataGroup; var n:int = dataGroup.numElements; for (var i:int = 0; i < n; i++) { var renderer:ItemRenderer = dataGroup.getElementAt(i) as ItemRenderer; if (renderer

Multiple CJuiAutocomplete in Yii - items not rendering

允我心安 提交于 2019-12-22 10:36:34
问题 I need two CJuiAutocomplete items on my view page. Unfortunately - only one of them is rendering items properly. The other one - renders empty rows. I checked in firebug and the values are retrieved from database properly. Actually if I change the order of the registerScript - only the autocomplete from last registerScript renders items properly. Here is my code: <?php $this->widget('zii.widgets.jui.CJuiAutoComplete', array( 'name' => 'autocities', 'sourceUrl'=>$this->createUrl('projects

Flex: Caching images in list item renderer?

会有一股神秘感。 提交于 2019-12-22 05:17:44
问题 I have a List and the item renderer displays an image. Whenever you scroll the list, and the item renderer refreshes, it redownloads the image. Causing there to always be a delay. Is there some way of caching it so it doesn't have to redownload every time causing a delay in showing the image every time you scroll the list? Thanks! 回答1: Here is nice solution with source code http://demo.quietlyscheming.com/superImage/app.html 回答2: You'll have to implement your own caching. I would store all

Flex DataGrid with ComboBox itemRenderer

主宰稳场 提交于 2019-12-20 10:43:39
问题 I'm going spare trying to figure out the "correct" way to embed a ComboBox inside a Flex (3.4) DataGrid. By Rights (e.g. according to this page http://blog.flexmonkeypatches.com/2008/02/18/simple-datagrid-combobox-as-item-editor-example/) it should be easy, but I can't for the life of me make this work. The difference I have to the example linked above is that my display value (what the user sees) is different to the id value I want to select on and store in my data provider. So what I have

How can I know when a Button in a Flex DataGrid itemRenderer is clicked?

天涯浪子 提交于 2019-12-19 08:52:32
问题 I have a DataGrid component that displays a few columns of data. It has one additional column that displays a Button that allows the user to take an action with regard to the record. <mx:DataGrid dataProvider="{myData}"> <mx:columns> <mx:DataGridColumn dataField="firstName" headerText="First Name" width="75" /> <mx:DataGridColumn dataField="LastName" headerText=" Last Name" width="150" /> <mx:DataGridColumn dataField="phone" headerText="Phone" width="120" /> <mx:DataGridColumn headerText=""

Conditional color change <s:SolidColor>

左心房为你撑大大i 提交于 2019-12-14 03:18:47
问题 I am unable to get the DataGridItemRenderer to pass a color value to <s:SolidColor based on the function containing an if statement based on the value of data.Bld_Type. Code below. I am vey new to Flex and not sure what the problem or if this is the right way of doing it. Any help would be appreciated. I have tried passing a hex number and color name. Neither work. Thanks. <?xml version="1.0" encoding="utf-8"?> <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s=

How flex itemRenderer works ? (their life cycle)

我是研究僧i 提交于 2019-12-13 20:12:37
问题 By works, i mean : how item renderer are instanciate , call , destroy... what is theire life cycle ? I had some display bugs, and this link open my mind to the problem http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=cellrenderer_072_14.html ( the doc is the same for flex3 ) But i want to know more. Any links or knowledge to share ? 回答1: Peter Ent wrote a series of blog posts on item renderers that is extremely useful:

Flex tilelist itemrender instance not match the dataprovider length

不羁的心 提交于 2019-12-13 19:40:18
问题 I use the custom itemrenderer for my Tilelist control. When I run my application. I found that the customitemrenderer's instance count was not equal to the dataprovider listItem count. There are only one item in the dataprovider list, but got 2 customitemrenderer instances. I count'd not find the reason. Can anybody help me. Many thanks! 回答1: For list based components, flex does this for efficiency. Imagine a dataprovider with 1000 rows, but the tile list only displays 9 at a time (3X3).