Adobe Dreamweaver Forums



Last 10 THreads :         Why is this not working!!! (Last Post : mickknight - Replies : 2 - Views : 3 )           »          Get the letter beneath the mouse cursor (Last Post : Raymond Basque - Replies : 2 - Views : 3 )           »          Interesting date query I need some help with (Last Post : -==cfSearching==- - Replies : 2 - Views : 3 )           »          Splash Screen is not been recorded... (Last Post : vratner - Replies : 4 - Views : 5 )           »          Tree drag and drop (move, copy to self) (Last Post : ntsiii - Replies : 1 - Views : 4 )           »          Please point me to the correct topic section of thisForum (Last Post : GillyWilly - Replies : 0 - Views : 1 )           »          Flash CS4 constant crashes (Last Post : dzedward - Replies : 2 - Views : 3 )           »          Download a Flash video? (Last Post : David Stiller - Replies : 1 - Views : 2 )           »          Spry repeat Region (Last Post : Hung Kuen Kung Fu - Replies : 0 - Views : 1 )           »          pdf question (Last Post : Joseph Kunz - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: , , ,



Reply
  #1 (permalink)  
Old 08-25-2008, 02:27 PM
nik600
 
Posts: n/a
Diggs:
Default Row select event in a Datagrid

I'm trying to manage an event in the Datagrid management:

I want to call a function when a row is selected (using mouse or keyboard
buttons).

I'm using the itemEditBeginning event, but as specified in documentation it
works only when the datagrid is editable="true".

Is there a possibility to intercept the selection of a cell/row even if
editable is not true?

Thanks to all in advance



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-25-2008, 02:51 PM
amthekkel
 
Posts: n/a
Diggs:
Default Re: Row select event in a Datagrid

hi,

in your datagrid call use the property itemClick.
e.g <mxataGrid id="DG" dataProvider="{some provider"}
itemClick"myFunction())">

then in your script you can declare the function myFunction
to get column values of the selected row, use
DataGrid.selectedItem.ColumnDatafield
so for the above datagrid with a column name and dataField=fullName i can use
DG.selectedItem.fullName

HTH

regards
abhi

Reply With Quote
  #3 (permalink)  
Old 08-25-2008, 03:43 PM
nik600
 
Posts: n/a
Diggs:
Default Re: Row select event in a Datagrid

i've already tried it, but itemClick event isn't called when i change the selected row using keyboard.

Thanks
Reply With Quote


  #4 (permalink)  
Old 08-25-2008, 03:43 PM
Mitek17
 
Posts: n/a
Diggs:
Default Re: Row select event in a Datagrid

You probably should look at this event:

itemFocusIn
Dispatched when an item renderer gets focus, which can occur if the user
clicks on an item in the DataGrid control or navigates to the item using a
keyboard.

Reply With Quote
  #5 (permalink)  
Old 08-25-2008, 04:12 PM
nik600
 
Posts: n/a
Diggs:
Default Re: Row select event in a Datagrid

with itemFocusIn works, but only when editable="true", and i don't want my datagrid editable.

Maybe can i let the Datagrid editable and then disable the editing on each cell?
Reply With Quote
  #6 (permalink)  
Old 08-28-2008, 08:42 AM
nik600
 
Posts: n/a
Diggs:
Default Re: Row select event in a Datagrid

i've resolved using the change="changeHandler()" attribute.


Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:26 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk