Flex Datagrid Selected Row
Hi all,
I have a problem. pls help me. I have a Datagrid. I am using
ItemRenderer for displaying an image. Based on user interaction
that image should be changed. Now I can change the image. But it is
affecting the whole datagrid clolumn which contains the
itemrenderer.
I have to change only the selected row's image. How can I
access selected row Itemrenderer?
Pls help me soon.
Thanks in advance
private function itemClickEvent(event:ListEvent):void {
trace(event.columnIndex);
trace(event.rowIndex);
<mx:DataGrid id="myGrid" width="350" height="150"
itemClick="itemClickEvent(event);" />
Similar Messages
-
How do I set only the first row of a DataGrid as the selected row?
I have a "Go" button on a search form that fetches data into an already data bound grid. After the data is fetched, I want to make the first row in the Datagrid the selected row, as if the user clicked on it. If the result set is empty, I don't want the code to crash. (I only want one row to be able to be selected at a time)
protected function btnGo_clickHandler(event:MouseEvent):void
getSBJsResult.token = baa_data_svc.getSBJs(cmbSrch.text);
grdSBJs. // ????? What goes here to select the first row?This should do it.
If this post answered your question or helped, please mark it as such.
if(myDataGrid.dataProvider.length > 0){
myDataGrid.selectedIndex = 0; -
How to edit selected rows in a datagrid?
Hi all,
I am new to flex and I would like to know how to edit
selected rows( through check boxes) in a data grid. As of now the
whole data grid becomes editable.
Regards
Saran.This is not simple in Flex 2.0.
You will need to use a custom itemRenderer.
Search the net, perhaps someone has a component or sample
close to what you want.
Tracy -
DataGrid, selecting, highlighting, navigating to a row
In Flash MX 2004
I would like to have a row selected after the DataGrid has
been populated.
Much like a list box <select> in html, I would like to
make one row
"selected". It must be navigated to and highlighted to
visually indicate the
selection.
However, the focusedCell property does not work when
dg.editable=false
So, I set the dg.editable=true, set the focusedCell to the
appropriate row
and cell then set the dg.editable=false. But this left the
chosen cell in an
editable (textbox) state that you would have to click out of
in order to see
all the contents of that cell. Ugly.
With the fine suggestion of DMennenoh, I used the
.selectedIndex property to
choose the selected row, but, although the item is in fact
selected, the
datagrid does not navigate to the selected field. It stays on
the first row.
You must scroll through the list to see the selected row.
Is there a way to progarmmatically choose and navigate to a
row in a
DataGrid without this effect?
JulianmyDG.setSelected(0)
"stjulian" <[email protected]> wrote
in message
news:e7pnao$ilo$[email protected]..
> In Flash MX 2004
>
> I would like to have a row selected after the DataGrid
has been populated.
> Much like a list box <select> in html, I would
like to make one row
> "selected". It must be navigated to and highlighted to
visually indicate
> the
> selection.
>
> However, the focusedCell property does not work when
dg.editable=false
>
> So, I set the dg.editable=true, set the focusedCell to
the appropriate row
> and cell then set the dg.editable=false. But this left
the chosen cell in
> an
> editable (textbox) state that you would have to click
out of in order to
> see
> all the contents of that cell. Ugly.
>
> With the fine suggestion of DMennenoh, I used the
.selectedIndex property
> to
> choose the selected row, but, although the item is in
fact selected, the
> datagrid does not navigate to the selected field. It
stays on the first
> row.
> You must scroll through the list to see the selected
row.
>
> Is there a way to progarmmatically choose and navigate
to a row in a
> DataGrid without this effect?
>
>
> Julian
>
> -
Selected Row Index of Advanced datagrid
Hi All,
I have an Advanced Data grid with about 100 rows in it. I have both editable and non editable fields in the grid. When I click on a row and select the row iam not able to get the selected row index correctly.Even if i click on the middle of the datagrid it is always displaying the first row only.
I want to get the selected row index of hte advanceddata grid correctly both in mouse click and key press.
Actually I want to display the data of the selected row in a jsp page.
What event should I use and some code example please.
Could anyone help please.
Regds
SangeethaWhat have you tried so far?
-
Is there a way of merging cells (not columns) in a Flex Datagrid?
Hello everyone!
I'm new to Flex and I have been searching for a solution to this problem for two days now, so any help would be really appreciated!
I have a datagrid of, lets say x columns of fixed size, with the ability to add or remove rows dynamically. When adding a row o popup comes up and lets the user determine the positions(order) and widths of the desired cells of the row. So what I want to do is to be able to merge cells of the new Datagrid row appropriately, to satisfy the user's choices. Thats the general idea.
Is there a way to have a Datagrid (or other similar component) with different cell number and widths for each row in Flex? I need a component similar to the Datagrid because I want to be able to select rows and process their data.
Any idea would be very helpful as I'm pressed for time and I could use someone's experience to search in the right direction and not loose time.
Thanks in advance!Thank you very much for your response. I finally did what I wanted without using a Datagrid. I used a Table Flex Component (which extends Flex Grid) that I found here:
http://code.google.com/p/flex-table/#Demo
I downloaded the source and changed some things to make it work as I need. -
How to use DirectCast for multiple selected rows?
Hi<o:p></o:p>
Me.SecondBindingSource.DataSource = DirectCast(parentForm.FirstBindingSource.Current, DataRowView) works perfect for single items but how do I do it if I've selected multiple rows on datagridOne and want to pass only the selected rows to datagridTwo using DirectCast?
Me.SecondBindingSource.DataSource = DirectCast(main.FirstBindingSource.Current, DataRowCollection) does not work??<o:p></o:p>You have to put the rows into a datatable. It is usually best if your original source is a datatable. The filter the original datatable. The selected rows of the datagrid are the same row numbers in the source datatable.
jdweng -
Flex DataGrid with Dynamic Grouping
Does anyone know of any examples of Flex datagrids that have
grouping features comparable to the numerous grid components
available in the ASP.NET world? I’m thinking of .NET
component vendors such as Telerik, Infragistics, Component Art,
DevExpress, etc.
The way these .NET controls generally work is that you drag
the header of a column to a bar above the grid, which causes the
grid to redraw based on the new grouping you just specified.
This is an example of a grid component that I am currently
using:
Telerik
Grid
Thank you,
Mike ChabotThe renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
Alex Harui
Flex SDK Developer
Adobe Systems Inc.
Blog: http://blogs.adobe.com/aharui -
Datagrid last row flickering problem.
Hi,
I used flex 3.5 datagrid. It is a complex datagrid with lot of itemrenderers and itemeditors.when my datagrid has vertical scroll and when i scroll datagrid, last row keep on flickering.
any idea or solution for this problem?my grid contains 6 columns. Among 6, some of the column texts are visible some of them hided.
it is only happens to last row of the Datagrid.
This is happened when i scroll my datagrid vertically. -
Flex datagrid itemRenderer with different states
Hi,
I have a datagrid with allowMultipleSelection="true" & itemRenderer as my custom component. The custom component have 2 states "NORMAL" & "EXPANDED".
Now on row selection the renderer should change its state from NORMAL to EXPANDED state. And if I am selecting multiple rows then all the selected rows should be in EXPANDED state.
As soon as the selection goes the renderer should retain its NORMAL state.
I am stuck. Please help me out.
Thanks in advance.Use itemclick property of grid and it passes ListEvent to the method given for itemclick. use selectedindices or selectedcells property in grid to find which are selected and change the states for the renderers of selected rows. U can get the renderer for the current selected row using event.itemRenderer property. Hope this helps.
-
Hi
I am using a flex datagrid component which has around 48 columns.
There is a option for the user to select which columns he wish to see.
Based on the user's selection the visible columns will be 1-50.
The Datagrid is inside a Vbox container.
The issue is, based on the screen resolution and the number of columns selected extra scroll bars(horizontal and vertical) appears
for the whole Vbox in addition to the Datagrid's scrollbars.
i.e if resolution is high and user selects more than 46 columns extra scroll bar appears.
If resolution is low the extra scroll bars appears as soon as the visible columns is more than 20.
Please help me if there is any resolution in preventing the extra scroll bars from appearing.Ideally, Since datagrid has its own scroll bars making more columns visible should not increase the width of datagrid.
Any help will be appreciatedHave you hard-coded the height and width of both the VBox and the Datagrid? If you set the datagrid height and width 40 pixels or so less than the VBox it should solve that problem, I'd think.
Or, you could set your DataGrid height and width to 90%.
Sorry if you've already tried this. Another option is to set your datagrid's scroll policy to "off" and just leave the VBox's scroll bars available.
-John -
Can i extend the Flex DataGrid using ActionScript and create as Add-On Component ?
I've been trying to get this to work. But i'm having issues Not sure if it's related to the Array binding limitation mentioned in the release notes. Maybe someone else has some ideas.
I'm trying to bind to the dataProvider property of the DataGrid. That way when the user in Xcelsius selects a range, it will bind the data in the excel sheet to the DataGrid.
Problem is that i'm only getting one value to update (specifically the top value). At this time i'm only trying to bind a single column of data.
I noted that the commitProperties function gets called whenever a cell changes that i'm bound to, but the dataProvider is only receiving the first value of the array. Even odder is that the ArrayCollection that i receive simply looks like this:
commitProp:dataProvider=(mx.collections::ArrayCollection)#0
filterFunction = (null)
length = 1
list = (mx.collections::ArrayList)#1
length = 1
source = (Array)#2
[0] 1
uid = "A37C62CC-F3DC-E1B1-8159-CE984C2CCE33"
sort = (null)
source = (Array)#2
So i see that i get an array collection of ArrayList objects, the first one of which simple contains the value in the excell sheet "1".
I noted that the proxy.bind function has a parameter called "chain", maybe this is what i need to get multiple value binding? The documentation for the calls are pretty basic, which is understandable as this is new technology.
So anyone have some ideas? Maybe someone from BO who is apart of the SDK group can comment? -
Flex datagrid data on datachange
Hi all,
I am using an extended datagrid which takes its height on the basis of measured height of items. Item renderer for datagrid is a canvas. Which holds one more canvas(header for item renderer) and a text area. The problem I am facing is with the header canvas in item renderer. Header canvas has one label which diaplay a name of user. On the basis of data provider for the current item visibility of this label in header canvas is set as true or false. issue is when it set to false it repaints(on data change event) all the previous header canvas label also to visible false. And just the last item has the data. Rather it should set its visiblity false only for the current item and rest items sholud behave as value set for them.
Thanks in advance.Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
Flex 3 - Handling service results:
Flex interprets the XML data that a web service or HTTP
service returns to ..... a DataGrid control with DataTable data
returned from a .NET web service.
Link:
http://livedocs.adobe.com/flex/3/html/data_access_6.html
Flex cookbook beta - Building Flex Applications with SOAP Web
Services:
Mar 3, 2008 ... If you are using web services technologies
then it is usually ... The DataGrid tag instanciates an instance of
the DataGrid Flex control.
Link:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postI d=7863
Flex 3 - Using WebService components:
The Flex web service API generally supports Simple Object
Access Protocol (SOAP) ... property of a DataGrid control and
displayed in the DataGrid control.
Link:
http://livedocs.adobe.com/flex/3/html/data_access_3.html
Adobe - Flex General Discussion:
Flex datagrid data column / webservice - justneed2know -
08/27/2008 ... I use a web service to populate a datagrid and its
columns (on of which is date).
Link:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1388794&enterthread=y
All Classes (Flex 3):
mx.rpc.soap, AbstractWebService is an abstract base class for
implementations that provide RPC access to SOAP-based web services.
Link:
http://livedocs.adobe.com/flex/3/langref/class-summary.html
Adobe - Developer Center : Using Flex Builder to Create Web:
Using Flex Builder to Create Web ServiceBased Flex
Applications ... The web service result data needs to flow to the
DataGrid. Select the 'Data will flow
Link:
http://www.adobe.com/devnet/flex/articles/flexbuilder_ws_04.html
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine. -
Flex datagrid data column / webservice
I use a web service to populate a datagrid and its columns
(on of which is date). The web services sources the data from a sql
server database and thru ASP.net to the Flex application. I've been
seeing strange things. During testing, database records such as
"8/27/2008 8:58:00 PM " correctly shows up as 8/27/2008 in the Flex
application, but records after 9PM such as "8/27/2008 9:01:21 PM"
shows up as 8/28/2008 (the next days) .. seems like after 9 throws
off the data rendering.. please suggest.Adobe Newsbot hopes that the following resources helps you.
NewsBot is experimental and any feedback (reply to this post) on
its utility will be appreciated:
Flex 3 - Handling service results:
Flex interprets the XML data that a web service or HTTP
service returns to ..... a DataGrid control with DataTable data
returned from a .NET web service.
Link:
http://livedocs.adobe.com/flex/3/html/data_access_6.html
Flex cookbook beta - Building Flex Applications with SOAP Web
Services:
Mar 3, 2008 ... If you are using web services technologies
then it is usually ... The DataGrid tag instanciates an instance of
the DataGrid Flex control.
Link:
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postI d=7863
Flex 3 - Using WebService components:
The Flex web service API generally supports Simple Object
Access Protocol (SOAP) ... property of a DataGrid control and
displayed in the DataGrid control.
Link:
http://livedocs.adobe.com/flex/3/html/data_access_3.html
Adobe - Flex General Discussion:
Flex datagrid data column / webservice - justneed2know -
08/27/2008 ... I use a web service to populate a datagrid and its
columns (on of which is date).
Link:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1388794&enterthread=y
All Classes (Flex 3):
mx.rpc.soap, AbstractWebService is an abstract base class for
implementations that provide RPC access to SOAP-based web services.
Link:
http://livedocs.adobe.com/flex/3/langref/class-summary.html
Adobe - Developer Center : Using Flex Builder to Create Web:
Using Flex Builder to Create Web ServiceBased Flex
Applications ... The web service result data needs to flow to the
DataGrid. Select the 'Data will flow
Link:
http://www.adobe.com/devnet/flex/articles/flexbuilder_ws_04.html
Disclaimer: This response is generated automatically by the
Adobe NewsBot based on Adobe
Community
Engine. -
I have a cfform which contains a cfgrid and prior to the 9 to 10 update, upon submission of the cfform, the selected row of the grid was passed/posted to my form action page as:
__CFGRID__gridForm__renewalGrid
This contained all the data from the selected row, I.e.:
__CFGRID__COLUMN__=PROJECTID; __CFGRID__DATA__=T01081002AP; __CFGRID__COLUMN__=APPLICATIONS; __CFGRID__DATA__=PQFD; __CFGRID__COLUMN__=OWNERUID; __CFGRID__DATA__=HT2008; __CFGRID__COLUMN__=TEAM; __CFGRID__DATA__=Roberts; __CFGRID__COLUMN__=ROLE; __CFGRID__DATA__=AASBOAPMX; __CFGRID__COLUMN__=REGION; __CFGRID__DATA__=Southwest; __CFGRID__COLUMN__=EXISTING; __CFGRID__DATA__=K8045F; __CFGRID__COLUMN__=SOD; __CFGRID__DATA__=0; __CFGRID__COLUMN__=INITIALEMAILDATE; __CFGRID__DATA__=01/28/2013; __CFGRID__COLUMN__=MESSAGEDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=SECONDEMAILDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=ESCALATIONDATE; __CFGRID__DATA__=; __CFGRID__COLUMN__=COMPLETEDBY; __CFGRID__DATA__=TH2878; __CFGRID__COLUMN__=COMPLETIONDATE; __CFGRID__DATA__=02/06/2013; __CFGRID__COLUMN__=MONTHPULLED; __CFGRID__DATA__=Jan2013; __CFGRID__COLUMN__=TOTALITEMS; __CFGRID__DATA__=2; __CFGRID__COLUMN__=RELIEVINGPSA; __CFGRID__DATA__=; __CFGRID__COLUMN__=MODIFIEDBYTS; __CFGRID__DATA__=02/06/2013; __CFGRID__COLUMN__=MODIFIEDBY; __CFGRID__DATA__=T228Y8; __CFGRID__COLUMN__=CREATEDBY; __CFGRID__DATA__=KV3M36; __CFGRID__COLUMN__=CREATEDTS; __CFGRID__DATA__=01/28/2013; __CFGRID__COLUMN__=NEWSA; __CFGRID__DATA__=; __CFGRID__COLUMN__=DELEGATESTATUSNOTE; __CFGRID__DATA__=Access; __CFGRID__COLUMN__=STATUS; __CFGRID__DATA__=Completed; __CFGRID__COLUMN__=DATATYPE; __CFGRID__DATA__=Appl New
After upgrading to CF10, and with no changes to the code, performing this same process, __CFGRID__gridForm__renewalGrid is still passed in the form scope to my action page, but now it is empty.
I have not yet uninstalled CF9, so I brought it up on a different port, and I can run the same code as CF9 or CF10 and watch... in 9 the selected row is passed, in 10 it is empty.
Is this a bug? Is there a work around? Please help.appears that apple has changed SMB code, and now its not possible login from windows on mac.
i installed snow leopard and now works fine.
apple is capable to make it run paying new license of smb code, but isnted of this, apple has created new protocol smbx and now, all others need to adapt your code to apple..
bad movement.. i am thinking sell imac and no back to apple anymore..
Maybe you are looking for
-
I have updated to IOS 7.1 my music has disappeared and my boyfriend has put his iPod music onto my iPod those also were gone I'd like to know how to get it back if there is anything you can tell me to get my music to pop back up that would be great.
-
I Book G4 display has gone black...Help
The display on my I Book G4 has gone black. I have tried to change the brightness in my settings, but the brightness is already all the way up. The only way I can see my screen is to shine a flashlight down at it and then I can see a tiny bit. Only e
-
Error in Adding the sample Portlet Provider
I got the congratulation !! after testing the JSP "http://ltree1:80/servlets/sample, but I'm getting the following error when I try to add the SampleWebProvider The error is : Error: An error occurred when attempting to call the providers register fu
-
Why is my USB Drive Always Labeled in Capital Letters?
I have a SanDisk Cruzer Blade 16 GB USB Drive, and when ever I'm on any Mac or PC, it's always in capital letters. Name goes from "SanDisk USB" to "SANDISK USB". Is there anyway to enable it to label in lower case letters?
-
Please help me solve this storage puzzle!
I have a clone of my old macbook pro that used Tiger on an external 320gig hard disk. I replaced it with a new computer. I didn't import from the external hard disk upon purchasing the new computer, and have hence filled it with 88GB worth of new fil