Flex :: Datagrid Select All Items?
Aug 9, 2010What would be the best way to select all items in a datagrid.
I was thinking of doing a for loop and then select each item, but is there a better way for achieving this?
What would be the best way to select all items in a datagrid.
I was thinking of doing a for loop and then select each item, but is there a better way for achieving this?
how to multiple select the datagrid? i can't figure it out.
View 1 RepliesIn a flex datagrid, by default clicking on column headers does sorting. I want it such that if a user clicks a column header the entire column is selected. I have the datagrid listening for the HEADER_RELEASE event so I know when the column header is clicked.
How can I have the column and header appear highlighted similar to how a row is highlighted when selected?
I have a datagrid. How can I put the focus on a particular row (ie row #5) of a datagrid via actionscript? I'm partially there, but not quite:
stage.focus = myDG;
This obviously just sets the focus to the datagrid and not the row.
I'm trying to modifty the Flex Tree control to allow a user to select multiple items by just clicking each of the desired elements (ie I don't want them to have to press Ctrl or Shift). If the user clicks a selected item a 2nd time, it will deselect it.
View 2 RepliesI have button like random click ,if i click this button then will select 15 checkbox within datagrid itemrenderer checkbox But i can't access the checkbox ? please refer me ? How can access the checkbox ?
<mx:DataGridColumn headerText="1" rendererIsEditor="true" editorDataField="selected">
<mx:itemRenderer>
<mx:Component>
<mx:CheckBox textAlign="center" click="{data.check1 = (data.check1 != 'true') ? 'true' : 'false'};outerDocument.toggleCheckbox(data);outerDocument.calcValues();"
[Code]...
i am using below code to select/deselect all checkbox in datagrid
<mx:DataGridColumn id="testColumn" width="20" sortable="false">
<mx:headerRenderer>
<fx:Component>
<mx:Canvas>
[code]...
i want to unselct checkAll checkbox when i deselect any of row checkbox,i am trying to access value of checkAll to check_clickHandler(), but i am not getting its value.
Does anybody know how to add a new row to a datagrid via a checkbox.
example:
checkbox 1 : label (PS2)
checkbox 2 : label (PS3)
checkbox 3 : label (PSP)
By selecting one or all of these checkboxes i what to add a new Datagrid row.
Datagrid
Console price
row1 PS2 $20,
row2 PS3 $30,
row3 PSP $15,
I'm using a custom component CheckBoxList DataGrid (http://blogs.adobe.com/aharui/2008/02/checkbox_selection_in_datagrid.html) and as dataProvider I have an ArrayCollection with items such this one:
name="item name" selected="true"
I would like the CheckBox list updated when the selected attribute is set to false or true in the data model.
I have a DataGrid with info like this:
Associate AmountTimeCustomer
John Doe 29amSam Smith
John Doe 210amBerry Cooper
Bill Ace 19amSandy James
Repeating the name and amount gets redundant so I would like it to look something like this:
Associate Amount
John Doe 2
Bill Ace 1
Then when you select one, it expands to show the times and customers for the selected associate. I hope this makes sense...I am currently just using a DataGrid but I can use an AdvancedDataGrid if thats needed...I am pretty sure something like this can be done, I just don't know how.My data is in xml and looks like this:
<stat associate="John Doe" date="08/12/09" amount="2" time="9 am" customer="Sam Smith"/>
<stat associate="John Doe" date="08/12/09" amount="2" time="10 am" customer="Berry Cooper"/>
<stat associate="Bill Ace" date="08/12/09" amount="1" time="9 am" customer="Sandy James"/>
I am using Datagrid control in flex.I need to get the count of number of items in that Datagrid. What is the method to get that?
View 1 RepliesI want to sort items in the datagrid alphabetically by name.The order should be:
1) The name should first check for upeercase of the name if it is not then it should look for lowercase for the same letter alphabetically.
For example : if i have array of items say{Apple,boy,ant,Bat) then after sorting the list shld be
Apple
ant
Bat
boy
Indeed the best for fast building of Web based Apps...
I'm trying to do something with eventListeners, but i still do a lot of messy code, so wanted help of those who already know flex.
I'm have a DataGrid, and its itens are added by another component, no problems with that.
I have buttons to Add, Remove and Edit the items inside the DataGrid. No problem with that too.
But i want those button to be enabled when the DataGrid as at least one item, and when it doesn't as any, all three buttons should be disabled.
EDIT: Forgot to say: I think eventListeners are the best way.
I am trying to display a list of items in a datagrid from a XMLList.
<Series no="1">
<file>
<filenum>1</epnum>
<prodnum>4V01</prodnum>
[code]...
My current code allows me to retrieve every Series into an XMLList and then i have a nesteddatagrid class that allows me to do things like.
<classes:NestedDataGrid width="100%" height="100%" id="gridFiles" dataProvider="{filesList}" >
<classes:columns>
<mx:DataGridColumn headerText="Season" dataField="@no" width="60"/>
[code]...
However this displays the datagrid with two rows, the first row has 1 in the Series column and then the two files crammed into the second cell in the same row. The second row is the same but has the number 2 in the Series column and the two series #2 files crammed into the cell next to it.If i do not use the nested data class i can pull the files using Series.file instead and all 4 of the files list correctly, however i do not get the Series number for each...
Is there a way to have ungrouped and grouped items mixed in the same datagrid?
For example, think of a grid that lists the root items on a C: drive.
Obviously, we would want the Directory Structure to be group and expandable. But the files on the root drive would also be shown on the list, however they would not be grouped.
a datagrid which renders some items. clicking on an item would bring up a popup editor (as the item has lots of properties and may not be edited right in the datagrid).
the popup contains just a form and a [Bindable] reference to the item it edits (which is passed from itemClick handler of the datagrid). form's default values are taken by binding to corresponding item properties with {} notion, while form values are bound back to the item using mx:Binding tags.
and now the problem. when the popup is brought up for the first time, everything is fine. however, when after being closed the popup is brought up again by clicking on the same item, the browser hangs (afaik because of change watchers being endlessly fired resulting in stackoverflow or something similar).
we have same behaviour in Safari, IE and Chrome, so i guess it's not to do with something browser-related. removing either [Bindable] from the item reference in the popup or mx:Binding tags from editors suppresses the problem, but of course the editing no longer works.
here's the code of the popup:
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Details"
showCloseButton="true" close="PopUpManager.removePopUp(this);" creationComplete="PopUpManager.centerPopUp(this)">
<mx:Script>
[Code]....
I have a DataGrid where some number of the columns can have a labelFunction. The nature of the labelFunction result can change problematically(eg apply formatting,bypass formatting. How do I get the DataGrid to re-render the visible items so that the labelFunction will be run again to get the new data.I've tried the invalidateDisplayList, validateNow, and tried dispatching ResizeEvents on the DataGrid.
View 1 RepliesI have my ADG displaying data like this:
[Code]...
I have id(array) used in my application.i want to select number of rows mathching given array but if i used gatagrid selected Index then it will be selected only one row only . i set data grid allowMultipleSelection="true" also .. .how can be select mutipule rows in datagrid ?
for(var i:int=0;i<id.length;i++)
{
datagrid.selectedIndex=id[i];
}
I have this datagrid:
<mx:DataGrid id="dgCompetenteN" includeIn="Test" left="10" right="472" top="69" bottom="149"
dataProvider="{colCompetente}" editable="false">
<mx:columns>
[Code]....
What I want to do is, when I select an item in the datagrid, the selected item of the dropdown should be the correct one (the one which has the field idCompSuperioara equal to the third element in the selected datagrid row).
My Flash designer is reading an XML stream I'm sending back to the browser (I'm a C# dev). We have this working fine.
He is then selecting into an XMLList where a element has its id a certain value i.e. . This is also working just fine.
In this XmlList, are Events, that look a little something like this:
event
startdate
enddate
end event
I don't know how to use the formatting here - but each of those items is an element. startdate would have a value such as 04/02/2010 and enddate 6/30/2010.
Now, from this XmlList I do have of Events, I need to select all Events where a new variable myDate, falls in between the startdate and enddate.
Is there a way to select all the items in a folder? I try to use the following:
fl.getDocumentDOM().library.selectItem("face/");
but it seems not work?
I'm currently creating a word game where I would like to place tiles, but if possible I need it to be possible to drag select groups of tiles (preferably with a visible selection box as you drag) and move them around all together.. is there a simple way to implement this and still have the tiles snap to a grid ?
View 1 RepliesTo select all the items in myList I wrote:
myList.selectedItems = ['red','cyan','magenta'] ;
But what if I don't know about the items in the mx:list in advance? How can I select all the items in a list without specifying their names?
I have a comboBox and values like basic and advanced. And viewstack container conatains 2 grids.When i select the base option in Combobox, the first grid has to be selected. select the advanced value in comboBox, the second grid has to be selected.
<mx:ViewStack id="viewstack1" width="95%" height="85%" x="0" y="63" >
<tables:KeyMetricsBasicTable basicArrayDataProvider="{basicArrayResult1}" width="100%" height="100%"/>
<tables:KeyMetricsAdvTable advArrayDataProvider="{advArrayResult1}" width="100%" height="100%"/>
</mx:ViewStack>
I set my list to allow multiple selection. But when I load data in my list, I want to set a few items as selected. Normally you can set only one item selected by using list.selectedIndex. It only accepts int. How can I set multiple items as selected?
View 2 RepliesI have a lot of stuff in the library. There are also additional items. Whether it has effect on the swf file. I can't use "select unused items" and delete. After that the swf does not work correctly.
View 1 RepliesFlex 4 Combobox is extended with a Text Input that helps in getting to the item that is searched for.I have created a Check Box as an itemrenderer for this Flex 4 Combobox. I would like to Add a Select All and Select None options in the drop down of the Combobox. I know that i could accomplish by editing the dropdownfactory in case of a Flex 3 Combobox. But in Flex 4 the dropdownfactory doesnt exist.
View 2 RepliesUsing Datagrid with AS2, if the Datagrid gets filled with one row of data I want to select that row with script, i.e. the program does it for the user.I can seem to find the syntax for selectrow(x)
View 2 RepliesI am trying to select and highlight a specific row on the datagrid in an embedded swf everytime the movie loads. I am using flash cs3 and actionscript 3 , published on flash player 9. anyone done anything similar? Did quite a bit of searching none of the methods actuall seemed to work.
View 1 Replies