ActionScript 3.0 :: DataGridColumn HeaderRenderer?
May 17, 2011
I'd like to use an embedded font in the column headers of my datagrid. Although this seems like it should be a pretty common task, I seem to have stumped Google trying to find a decent, modern example (that actually works) for creating an appropriate headerRender in Flex 4.
Can anyone point me to an example of how to use an embedded font in the column header of a datagrid? I've spent hours trying to figure this out.
View 0 Replies
Similar Posts:
Oct 1, 2010
I have a datagrid in my Flex App, and I;m uisng a custom HeaderRender. This HeaderRender has a checkbox. How can I control the checkbox from outside the HeaderRender?
View 1 Replies
Mar 18, 2011
how to create an headerRenderer and embed and image in the first header (column) for my datagrid.
View 1 Replies
Jun 21, 2011
I have a custom FilterColumnHeaderRenderer with an HBox, inside a Label for the Column Header, a Textinput for the filter text and Label to clear the filter. Now I want that the column sorting only takes place on clicking the title.Currently the I use the sortCompareFunction on HeaderRelease for the whole columnHeader.[code]
View 2 Replies
May 11, 2010
Can somebody share an example on how to set the backgroundcolor of a datagridcolumn (dynamically)?
View 3 Replies
Jun 27, 2010
I'm building an application using flex 4.
Using <mx:DataGrid> to display a table.
I would like to add a <s:GlowFilter> to a DataGridColumn. How can I do so?
View 1 Replies
Jul 8, 2009
Is it possible to put an itemrenderer on the DataGrid itself rather than a datagridcolumn? I could only find examples for datagridcolumn. I want a generic itemrenderer on all the items in a datagrid...
View 1 Replies
Aug 31, 2009
I have a datagrid column with a button that opens a modal dialog box allowing the user to upload multiple files. In the code below, the browseAndUpload() method does that. When the user finished uploading files and closes the upload box the closeUpload() method is called. I know for a fact that the uploaded files are being copied into arrFiles.
The problem I am having is that the repeater will not show the files in arrFiles. Here is the code:
<mx:DataGridColumn id="dgcUpload" width="42" headerText="Uploaded Files"
editable="false">
<mx:itemRenderer>
[Code].....
View 2 Replies
Nov 27, 2009
I have this DataGrid:
<mx:DataGrid id="myDataGrid">
<mx:columns>
<mx:DataGridColumn dataField="colA" headerText="Column A:" width="40"
[code].....
View 1 Replies
Mar 3, 2010
I am using a custom componenet based off of text as an itemRenderer for a dataGrid that is displaying an XMLList. I want to be able to re-use this itemRenderer for multiple columns, how do I access the dataGridColumn so I know which field to assign to the text value?
super.data gives me the whole XML item, super.parentDocument gives me the whole DataGrid
View 1 Replies
Nov 9, 2010
I have a DataGrid with 3 DataGridColumns. All 3 of them have separate dataFields.I need to get the datafields into an ArrayCollection and pass it to a funciton. I dont want to hard code the ArrayCollection.
View 1 Replies
Apr 20, 2011
how to concate two datafield in a datagridcolumn?
View 2 Replies
Mar 1, 2010
I have a dataGrid with a custom dataGridColumn having as itemRenderer MyItemRenderer. My problem is that I want from MyItemRenderer to access informations in the dataGridColumn. More exactly I would like for an itemRenderer I would like to know the associated dataGridColumn.
View 1 Replies
Sep 16, 2009
How do I make text selectable (so I can copy) in a DataGridColumn?
View 2 Replies
Apr 30, 2010
I have a datagrid that I want to add a column of radio button using AS3 (instead of mxml). I was able to do this with a custom itemRenderer.
var dgc:DataGridColumn = new DataGridColumn();
dgc.itemRenderer = new ClassFactory(com.mypackage.RadioBtnColumnItemRenderer);
In my RadioBtnColumnItemRenderer.mxml, I have a box with a radioButton... like so:
<?xml version="1.0" encoding="utf-8"?>
<mx:Box xmlns:mx="[URL]" horizontalAlign="center" verticalAlign="middle">
<mx:RadioButton id="btnRadio" groupName="btnRadioSelect"/>
</mx:Box>
When I run the application, the radio button shows up in the column as it should. However, I cannot select just ONE of the radio buttons. I am able to select all of them, but I don't want this... I want the ability to select one and then if I select another one, then the first one is unselected and the current one becomes selected (just like you would expect radio buttons to work).
View 2 Replies
Apr 15, 2012
How can I validate the cells in a DataGridColumn individually? (ActionScript 3.5) The validation is configured per-cell, based on fields in the given row. For example
FIELD VALUE TYPE
age 13 Integer
height 13x3 Integer
[code].....
View 3 Replies
Aug 16, 2010
I have an itemrenderer used by multiple datagridcolumns and I need to have some condition in the itemrenderer based on the headertext of the datagrid column. Can I access the headertext property from within the itemrenderer?
My itemrenderer extends the LinkButton control and implements the IDropInListItemRenderer interface.
View 1 Replies
Aug 20, 2010
I'm trying to reach the dataField of a DataGridColumn in the itemRenderer. Below is the dataGrid:
<mx:Script>
<![CDATA[
[Bindable] public var weeksOfMoth:ArrayCollection = new ArrayCollection([
[code].....
In the set data function of the itemRenderer, I receive an entire week (which is ok), but the itemRenderer doesn't know which day to use because the dataField is unknown. Does anyone know how to reach this dataField in the itemRenderer?
View 5 Replies
Oct 1, 2010
I am unable to compile the following Flex application.All I am trying to do is, to extend DataGridColumn class.I get the following compile error :
Could not resolve to a component implementation.
DataGridColumnTest/src DataGridColumnTest.mxml line 6
DataGridColumnTest.mxml :
[code]........
View 1 Replies
Jul 26, 2011
I can't see a way to get rid of certain borders within a DataGrid. I'd like to eliminate a side border on 2 of my columns so that they appear to look like a single column.I'm trying to implement a "clear value" button on each of my DataGrid rows. I was able to have a button show on a custom ItemRenderer from a separate ActionScript file, but I was unsure how to have the button click event propagate to the mxml file where the DataGrid is located. It would be much easier for me to have an extra unresizable column with a 'clear' button.
So, to reiterate: Is there any way to change the border style or eliminate certain borders of a DataGridColumn?
View 1 Replies
Oct 28, 2011
I have a DatagridColumn in flex with two names, TYPE and NAME. Now, when I am sorting a datagridcolumn, TYPE, it sorts the type using sortcomparefunction and gives the result which contains grouped and sorted order of elements. Ex. if I sort for type I get elements in pdf, doc, ppt in grouped order, but they are internally not sorted, ex: for the pdf part, I have elements such as:
TYPE NAME
pdf A1.pdf
pdf X2.pdf
pdf B1.pdf
Here the filetypes are sorted, but for a particular filetype, the elements are not, please notice that B1 occurs after X2, which should be sorted. Is there a way I can sort the second datagridcolumn after sorting the first one according to filetype extensions? I am using sortcomparefunction for sorting the elements according to type , which works fine. The signature is:
private function sortTheTypeColumn(itemA:Object, itemB:Object):int
View 1 Replies
Jan 10, 2012
I have the following datagrid:
<mx:DataGrid id="question" x="9" y="289" width="100%" height="54" visible="{false}" >
<mx:columns>
<mx:DataGridColumn dataField="ans1" headerText="ans1"/>[code]..........
I need to access the data pointed by the dataField, and bind it to a label, but i don't known how to get it.
<s:Label id="debug" x="575" y="106" width="56" height="35" text="{data_from_coloumn_grid_ans1}" />
View 1 Replies
Aug 18, 2009
Is it possible to display a multiline string in a Flex DataGridColumn?i.e. Display:
Text line one.
Text line two.
I've tried putting "
","
"," " when storing the string but nothing seems to work.Currently only "Text line one." is displayed and the rest is hidden in the cell. I would prefer not to use "wordWrap=true" to emulate this behaviour in the cell, but instead be able to manually put in newline breaks (although I could turn on wordWrap to avoid long text from hiding due to cell dimensions).
View 3 Replies
Aug 25, 2009
I extended the DataGridColumn because I wanted to include a custom itemToLabel function (to be able to show nested data in the DataGrid. See this question.
Anyways, it also needs a custom sorting function. So I have written the sorting function like so:
private function mySortCompareFunction(obj1:Object, obj2:Object):int{
var currentData1:Object = obj1;
var currentData2:Object = obj2;
[Code].....
Whenever I try to sort the column, I get the error "Error: Find criteria must contain at least one sort field value."
When I debug and step through each step, I see that the first few times, the function is being called correctly, but towards the end, this error occurs.
View 4 Replies
Sep 1, 2009
Within a DataGrid, I have a DataGridColumn that uses a custom component as the item renderer. Within the component, I have an ArrayCollection that stores a set of value objects. My problem is that I cannot access the ArrayCollection values from outside of the item renderer component. Does anyone know how it would be possible to do this? I have posted a code snippet below.
<mx:Script>
<![CDATA[
// Cannot access arrFiles from here.
[code].....
View 2 Replies
Feb 16, 2010
I have a Datagrid thats being populated by different Arrays... (headers/columns change for the same DataGrid)... I would like to Select a Column of the Datagrid after it was generated by the Dataprovider and Bold it, and place it as the 'last column"
This is what I have.... and throwing an error:
private function populateGrid(evt:Object):void {
dg.dataProvider = evt as Array;
if (dg.columns.length > 0) {
for (var i:int = 0; i < dg.columns.length; i++) {
if (dg.columns[i].dataField == '_user_total') {
DataGridColumn((dg.columns[i].dataField)).setStyle('fontWeight', 'bold');
}}}}
This way I would like to have One Datagrid (for different Arrays) )without having the Columns fixed and declared (like in MXML), but dynamic, and would like a 'specific' column to be Bolded, and placed as the last column, in this example, the column with dataField _user_total.
View 1 Replies
Mar 12, 2010
I have a datagrid that uses an array of objects as the data provider. The objects are essentially key/value pairs:
{ foo:"something"}
{ bar:"hello"}
{ caca:"lorem"}
The datagrid has 2 columns. The first column is the key and the second column is the value. Right now my grid looks like:
My dataFormatter function makes sure that depending on the column (i.e. the dataField value) the correct key or value gets printed out. This works fine for displaying. However, as soon as I try and edit the value field it essentially adds a new value into the object with a key of '1'. For example, if I edit the {caca:"lorem"} object it will then contain the value {caca:"lorem",1:"new value"}.
Is there any possible way I can set the DataGridColumn so that when I edit a value it will update the value associated with the key rather than inserting a new value? I've tried using a custom item editor but it still does the insert. It seems like I need to be able to update the 'dataField' with the actual key value but I'm not sure how to do that.
View 1 Replies
May 24, 2010
[code]I am trying to define a DataGrid such that the row nodes will represent new rows in the DataGrid and the column nodes will be used to auto-populate the DataGrid's columns. I am having a problem setting the dataField for each of the DataGridColumn ojects created.The DataGrid is created but the cell values for row 1 are all 0.51 and row 2 are 0.61.
View 1 Replies
Jun 18, 2010
Is there anyway to create a custom item editor based on the dataField value? For example:
<mx:DataGrid editable="true" dataProvider="{_actionArr}" id="prop">
<mx:column>
<mx:DataGridColumn headerText="Component" editable="false" dataField="label"/>
[code]....
View 2 Replies
Mar 7, 2011
I have a datagridcolumn where a labelFunction is defined:
[Code]...
Would it be possible to add an additional parameter so that I could pass the property values for the formatter which I intend to use? Like for example:
[Code]....
View 2 Replies