Flex :: View - Evenly Distribute Columns In A DataGrid?
Jul 14, 2010
I have 16 columns in a DataGrid in my Flex app. The first 15 look fine, with the column, simply containing the text, but the last one has a lot of extra space. Essentially, the columns are just big enough to fit the first 15 and all that extra space is tacked onto the 16th column.
How can I evenly distribute the space over each column?
<mx:DataGrid x="127" y="9" id="view"
dataProvider = "{currentBuffer}" width="497" height="480">
<mx:columns>
[Code].....
View 2 Replies
Similar Posts:
May 26, 2010
I am working on The ausdcf.org to try adding several banner ads in swf format to the top. The client chose not to go with Google AdManager, but prefer a "minimal approach" to do this task. What I am trying to do is sort of "mimicking" the way Google AdManager does for banners, that is, to split the chance of each particular swf to be shown to the visitor evenly among the banner collection.
Definitely I can add some jQuery code to do this from client-side, a random number generator and if-else statement would work - just $.load() it However, what if I'd like to make sure those disabled Javascript (is there any now btw?) still be able to see different swfs in each visit.
View 1 Replies
Jan 11, 2010
I want to save remotely (on a database) the state (visible columns, columns width and order) of a Flex3 DataGrid.For width and visibility I can simply save them by accessing each column attribute.. But for the order? Do I have to create the dataGrid dynamically?
View 2 Replies
Jun 9, 2011
I have one Datagrid in Flex. In datagrid there are 4 columns like mark1,mark2,mark3,Total.When i enter mark1,mark2,mark3 that time i want to update total.
View 2 Replies
Jul 22, 2009
I have a 1 row, many column flex datagrid. I would like to turn the dataGrid on its side, so that the column headers become a single column running down and v.v. Is there a way to do that in the DataGrid? Or am I stuck manipulating the data presented to the grid?
I have an object like:
x=y
b=u
o=p
u=e
w=p
And I'd like a control that is visually similar to that. Currently the datagrid displays the object as:
x b o u w
y u p e p
Which is too horizontal for my case.
View 2 Replies
Nov 4, 2009
My Main.MXML
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:mate="http://mate.asfusion.com/" width="100%" height="100%">
<mx:AdvancedDataGrid sortExpertMode="true" id="baselineGrid" dataProvider="
[Code].....
I need to send the entire datagrid columns to PHP. How to send all the values of the column 1 and column 2.
Note: COlumn 2 is an itemRenderer which has a combo box.
View 1 Replies
May 1, 2011
1) Using datefield as item renderer in flex.I am dynamically creating datagrid and its columns. like
dataGridColumn=new DataGridColumn();
dataGridColumn.dataField="invoiceDTO.invoiceDate";// I read this value from XML
dataGridColumn.editorDataField="selectedDate";
dataGridColumn.itemRenderer=new ClassFactory(DateFieldRenderer);
dataGridColumn.rendererIsEditor=true;
But when UI is generated i get the error invoiceDTO.invoiceDate not found on the TestDTO
//Test DTO
public class TestDTO
{
public var invoiceDTO:InvoiceDTO;
}
My objective is my dataField should be binded with datafield inside the datagrid.How can i do it in actionscript
2) I need to present combobox as item renderer. (same like case 1). But how can i assign dataprovider in the combobox which is present inside the datagrid.
View 1 Replies
Sep 22, 2011
I am trying to make a datagrid, that will dynamically add columns to it based on some condition. Now, I am able to add the columns, but I want the newly added column to have button using itemRenderer. I am unable to achieve this though. Getting this error on line 1
[Code]...
View 1 Replies
Oct 14, 2011
The datagrid gets its data from a back end database which has records like
[Code]....
I get errors like 1061: Call to a possibly undefined method refresh through a reference with static type mx.controls:DataGrid. for myRecords.refresh(); and Access of possibly undefined property sort through a reference with static type mx.controls:DataGrid. for myRecords.sort
View 1 Replies
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
Feb 25, 2010
I created a component that is multiple datagrids side by side that share the same columns (each datagrid is the same as the one before but with different data).ProblemThe header text only shows up on the last datagrid. How can I get the text to show up on all the datagrid headers?Here is how I instantiate the component.
<common:PageDataGrid width="100%" height="100%"
numGroups="5" numRows="9" dataProvider="{createData(5, 9)}">
<common:columns>
[code]........
View 1 Replies
Apr 30, 2010
I'm trying to create a Flex DataGrid where the firstname and lastname are shown under each other, but in the DataGridColumn
Ideally I would want to do something like
<mx:columns>
<mx:DataGridColumn headerText="Column 2" dataField="time"/>
<mx:DataGridColumn headerText="Column 2" dataField="firstname,lastname" itemRenderer="renderers.FirstNameLastName"/>
so that both values get passed to the itemrenderer, is this possible?
View 1 Replies
May 3, 2010
For example : Having four columns in advance datagrid like company,contact_person,product and date. In this, first i want to sort by product followed by company and followed by date.
View 1 Replies
Oct 26, 2010
I have a data grid with an Combobox itemRenderer in it. What I have is a grid with a person id and person name (more stuff in grid but I am struggling with this). In the person name column I have an combobox with all the people on then system's names and id's. What I want to do is when I select a person in the combobox I want the combobox to populate the person name fields (which it does) but I also want to pull out the person id from the combobox and populate the person id column in the data grid as well.
View 1 Replies
Feb 11, 2011
I have a Datagrid that is being populated by an ArrayCollection (rows) of Arrays (columns).I need to update the headerText of each column based on a List that will correspond with the total number of items within each array in the arraycollection. What is the best way of doing this? I know that I can set a listener in the List and update the headerText using (matrixDatagrid.columns[i] as DataGridColumn).headerText but I am looking for a cleaner solution.
View 1 Replies
Jul 17, 2011
I have a datagrid which displays details for a product. For a particular product i need to display its Id current status(Available/ Not) and which category it belongs to. The category part is a bit different from what it seems to be like. Product A can belong to Category A, B and C while product B belongs A ,c and D and so on. Structure of this table would be something like The category columns are retrieved from database and passed as parameter to construct the columns dynamically in Datagrid. I have defined the following Datastructure on UI to handle this.
Product{
var productId:String;
var productName:String;
var status:String;
var categoryList:ArrayCollection;
}
I am not sure if this will be able to solve my problem. I think I will need to have a Map containing category Names and if it is applicable for that product.
View 1 Replies
Oct 25, 2011
I want to know how i set width in percentages of columns of MX datagrid in flex ?
View 2 Replies
Sep 8, 2009
The flex DataGrid colums are arranged alphabetically by default. I need to order the DataGrid colums as per the order in its dataProvider. The dataprovider is the result of the HTTPService . And the number of columns is not known to us . The number of columns depends on the HTTPService result.
View 1 Replies
Oct 8, 2010
I have a data grid where users can drag columns and reposition them. But there is a strange requirement that some columns should not be draged to the left of some other column. eg, assume the columns are: name, price , start date, end date, The end date should not be dragged and placed before the start date. i.e. The user can have start date, price , name , end date. name, start date, price , end date. But at no point can end date appear before start date. Is there a way to do this flex? Is there a way to know where the user is trying to drop the column and show error message ?
View 2 Replies
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
Oct 10, 2011
I have this spark DataGrid with five columns. my third and fourth columns represent amount (of product ordered) and price (of a unit of the product). My issue now is to set the fifth column equal to price*amount. I can't seem to find a way to do this.
View 1 Replies
May 17, 2010
I am trying to figure out how to manage a Datagrid based on an XML object like this:
[Code]...
I will need to populate the Datagrid column names based on a different XML object and use the above XML to populate each of the column's rows. I currently am able to create the Datagrid and populate its column headers but I am unsure as to how to how to add the rows for each column. The above XML will be update with new row and column elements added and deleted. This, of course, will be bound to the Datagrid to show updates.
View 2 Replies
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
Mar 21, 2011
How do you use flex datagrid lockedColumnCount for two columns?
For example, I have 5 columns of datagrid columns: A, B, C, D and E. I want the A and E columns to be locked and the remaining columns able to be scrolled horizontally.
View 1 Replies
Jan 5, 2011
I'm trying to make a Flex (Advanced)DataGrid component with some mechanism where the user can toggle the visibility of the columns. I've crudely implemented this by reading in the columns into the right-click menu, and when a column name is selected here, the visibility is toggled. It works, but it's not the most elegant solution.Specifically, I'm trying to emulate the "datagrid" that Mozilla Thunderbird uses to display emails. Here is an image:
In the upper right, there is an icon over the scroll bar. If there is no scrollbar, the icon remains in the same place. When clicking the icon, it opens up a menu that shows all the possible columns, with the visible ones having a check mark next to them, like this:
Also, the scroll bar always appears under this button, never "pushing" it over into it's own column.I'd like to re-create this in Flex. I believe the menu part and creating a column with a button headerRenderer is easy enough. But I can't figure out how (if at all possible) to do this with the scrollbar, because the scrollbar always seems to be "its own column".
View 1 Replies
Oct 26, 2011
<mx:DataGrid id="dgAutoFill" x="11" y="234" width="934" dataProvider="{rssHln.lastResult.rss.channel.item}">
<mx:columns>
[Code]....
I'm trying to get the title from the selecteditem from this datagrid (which is filled by a rss-feed) in a label. I've searched for ways, but I can't find how I should get this done.
This is the eventhandler I've added to the datagrid, and the function:
dgAutoFill.addEventListener(ListEvent.ITEM_CLICK, showDetails);
public function showDetails(event:ListEvent):void {
lblTitle.text = ?;
}
View 1 Replies
Jan 23, 2012
In my flex datagird i have a checkbox and a datgrid with seven columns. im populating values in first five column(remaining two column no values) of datgrid by an Arraycollection. now,By clicking the checkbox i want to show all seven column values and if i uncheck five columns has to show... how its possible?? heres my code
[Code]...
View 1 Replies
Nov 6, 2009
Is there any way to disable a few columns for a particular row in flex datagrid?
I have a datagrid with about 10 or more columns, say for example a few column names are: Item Id, Item Name, Item Status and VerifiedState. Initially I want the column Verified State to be disabled.
Now When the value of the column, Item Status is Review Passed for a particular row, I want the column VerifiedState to be enabled and editable. Is that possible in Flex datagrid.
View 2 Replies
Dec 11, 2011
In the Spark DataGrid the default row height is about 22 px. I would like to set the default row height to 18 pixels and I can do this easily enough with the rowHeight property but what happens is when the rowHeight is set to anything less than 22 px the bottom area of the text in each row is cut off. It seems that the default grid itemrenderer or grid label has a min height set to it. Since I have multiple columns and want to have shorter rows but not have the bottom of the text cut off in each row how would I do this?
View 2 Replies
Jul 28, 2011
I have a datagrid that uses a custom cellrenderer class to allow me to use a combobox. I have an invisible column that holds the value returned by the cellrenderer when the combobox value is changed. BUT sorting is wonky. Since what really lives in the combobox column individual cells is an object, it never really sorts properly. Is there a way to fire a sorting event to the column that holds the real value?
View 4 Replies