RE: [flexcoders] Datagrid cell editing question

2008-05-20 Thread Alex Harui
You'd have to set editedItemPosition



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pratima_jrao
Sent: Monday, May 19, 2008 5:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid cell editing question



Hi,

I have an application where I prevent users from editing certain cells
in a datagrid. I am using the itemEditBeggining event and when the
event gets triggered I call the event.preventDefault() method if the
cell should not be edited. 

The problem with this approach is that the tab functionality doesn't
work. I am attaching a snippet of code from the adobe site from where
I used this approach. Here is the link too if you want to play with
the example datagrid.
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.htm
l
 

Do you folks have an idea about how to make tab work in the datagrid?
so it skips the cell that shouldn't be edited and jumps to the next
cell that can be edited? Any suggestions or ideas on this will be
highly appreciated.

Thanks,

Pratima



http://www.adobe.com/2006/mxml
 ">





 




 
 





 


RE: [flexcoders] Datagrid cell editing question

2008-05-20 Thread Pratima Rao
Thanks - that worked!!

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, May 20, 2008 7:52 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

 

You'd have to set editedItemPosition

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pratima_jrao
Sent: Monday, May 19, 2008 5:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid cell editing question

Hi,

I have an application where I prevent users from editing certain cells
in a datagrid. I am using the itemEditBeggining event and when the
event gets triggered I call the event.preventDefault() method if the
cell should not be edited. 

The problem with this approach is that the tab functionality doesn't
work. I am attaching a snippet of code from the adobe site from where
I used this approach. Here is the link too if you want to play with
the example datagrid.
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.htm
l
<http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.ht
ml> 

Do you folks have an idea about how to make tab work in the datagrid?
so it skips the cell that shouldn't be edited and jumps to the next
cell that can be edited? Any suggestions or ideas on this will be
highly appreciated.

Thanks,

Pratima



http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> ">





 




 
 




 



RE: [flexcoders] Datagrid cell editing question

2008-05-20 Thread Pratima Rao
I have one more question - I changed the code in the disableEditing
function and added another condition (in bold below). This breaks when
you enter the return key in the datagrid. I know why this is happening.
Is there another way to handle cell editing where tab and return key
works when you enable or disable specific cells? The reason I ask is
that I built a database query tool in Flex and I have a Create Table GUI
where a user can insert column name, data type, length, precision,
scale, primary key etc in the grid. Based on the datatype (VARCHAR,
BIGINT, NUMERIC etc) the user selects I have to disable length,
precision or scale.  I used the approach below and it works fine as long
as you don't tab or use the return key. Based on Alex's suggestion I got
the tab to work but the return key doesn't work. I'm thinking that maybe
this approach is not the right way to go but we are 2 weeks away from
going into production and I don't want to redesign the GUI this late in
the game.

 

 





http://www.adobe.com/2006/mxml"; width="100%"
height="100%">

 









 

 









 





  

   

   

   



 





 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Tuesday, May 20, 2008 10:19 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

 

Thanks - that worked!!

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, May 20, 2008 7:52 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

 

You'd have to set editedItemPosition

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pratima_jrao
Sent: Monday, May 19, 2008 5:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid cell editing question

Hi,

I have an application where I prevent users from editing certain cells
in a datagrid. I am using the itemEditBeggining event and when the
event gets triggered I call the event.preventDefault() method if the
cell should not be edited. 

The problem with this approach is that the tab functionality doesn't
work. I am attaching a snippet of code from the adobe site from where
I used this approach. Here is the link too if you want to play with
the example datagrid.
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.htm
l
<http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.ht
ml> 

Do you folks have an idea about how to make tab work in the datagrid?
so it skips the cell that shouldn't be edited and jumps to the next
cell that can be edited? Any suggestions or ideas on this will be
highly appreciated.

Thanks,

Pratima



http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> ">





 




 
 





 



RE: [flexcoders] Datagrid cell editing question

2008-05-20 Thread Alex Harui
Maybe if you keep track of the last editedItemPosition you can tell if
the user is tabbing or not.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Tuesday, May 20, 2008 1:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question



I have one more question - I changed the code in the disableEditing
function and added another condition (in bold below). This breaks when
you enter the return key in the datagrid. I know why this is happening.
Is there another way to handle cell editing where tab and return key
works when you enable or disable specific cells? The reason I ask is
that I built a database query tool in Flex and I have a Create Table GUI
where a user can insert column name, data type, length, precision,
scale, primary key etc in the grid. Based on the datatype (VARCHAR,
BIGINT, NUMERIC etc) the user selects I have to disable length,
precision or scale.  I used the approach below and it works fine as long
as you don't tab or use the return key. Based on Alex's suggestion I got
the tab to work but the return key doesn't work. I'm thinking that maybe
this approach is not the right way to go but we are 2 weeks away from
going into production and I don't want to redesign the GUI this late in
the game.





http://www.adobe.com/2006/mxml"; width="100%"
height="100%">









 









 





  

   

   

   









From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Tuesday, May 20, 2008 10:19 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

Thanks - that worked!!



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, May 20, 2008 7:52 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

You'd have to set editedItemPosition



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pratima_jrao
Sent: Monday, May 19, 2008 5:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid cell editing question

Hi,

I have an application where I prevent users from editing certain cells
in a datagrid. I am using the itemEditBeggining event and when the
event gets triggered I call the event.preventDefault() method if the
cell should not be edited. 

The problem with this approach is that the tab functionality doesn't
work. I am attaching a snippet of code from the adobe site from where
I used this approach. Here is the link too if you want to play with
the example datagrid.
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.htm
l
<http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.ht
ml> 

Do you folks have an idea about how to make tab work in the datagrid?
so it skips the cell that shouldn't be edited and jumps to the next
cell that can be edited? Any suggestions or ideas on this will be
highly appreciated.

Thanks,

Pratima



http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> ">





 




 
 





 


RE: [flexcoders] Datagrid cell editing question

2008-05-22 Thread Pratima Rao
Alex - I got the tabbing/enter key to work in the datagrid with your
suggestion. It took me a while to make it work. One last problem
(hopefully) - I have an Ok and Cancel button below the datagrid and when
I tab in the datagrid it never gets to these buttons. It's due to the
fact that event.preventDefault method is called to prevent editing of
the cell. How do I work around this? I am sending you sample code where
you can reproduce this behavior. I wouldn't have made it this far
without your suggestions. I appreciate all your help. 

 

Pratima

 

 





http://www.adobe.com/2006/mxml"; width="100%"
height="100%">

 









 

 









 





  

   

   

   



 





 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, May 20, 2008 2:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

 

Maybe if you keep track of the last editedItemPosition you can tell if
the user is tabbing or not.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Tuesday, May 20, 2008 1:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

I have one more question - I changed the code in the disableEditing
function and added another condition (in bold below). This breaks when
you enter the return key in the datagrid. I know why this is happening.
Is there another way to handle cell editing where tab and return key
works when you enable or disable specific cells? The reason I ask is
that I built a database query tool in Flex and I have a Create Table GUI
where a user can insert column name, data type, length, precision,
scale, primary key etc in the grid. Based on the datatype (VARCHAR,
BIGINT, NUMERIC etc) the user selects I have to disable length,
precision or scale.  I used the approach below and it works fine as long
as you don't tab or use the return key. Based on Alex's suggestion I got
the tab to work but the return key doesn't work. I'm thinking that maybe
this approach is not the right way to go but we are 2 weeks away from
going into production and I don't want to redesign the GUI this late in
the game.





http://www.adobe.com/2006/mxml"; width="100%"
height="100%">









 









 





  

   

   

   









From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Tuesday, May 20, 2008 10:19 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

Thanks - that worked!!



size=2 width="100%" align=center tabIndex=-1> 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, May 20, 2008 7:52 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

You'd have to set editedItemPosition



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pratima_jrao
Sent: Monday, May 19, 2008 5:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid cell editing question

Hi,

I have an application where I prevent users from editing certain cells
in a datagrid. I am using the itemEditBeggining event and when the
event gets triggered I call the event.preventDefault() method if the
cell should not be edited. 

The problem with this approach is that the tab functionality doesn't
work. I am attaching a snippet of code from the adobe site from where
I used this approach. Here is the link too if you want to play with
the example datagrid.
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.htm
l
<http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.ht
ml> 

Do you folks have an idea about how to make tab work in the datagrid?
so it skips the cell that shouldn't be edited and jumps to the next
cell that can be edited? Any suggestions or ideas on this will be
highly appreciated.

Thanks,

Pratima



http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> ">





 




 
 






 



RE: [flexcoders] Datagrid cell editing question

2008-05-24 Thread Alex Harui
You may need to detect that you're at the last row and column and not
call preventDefault.  You can always call setFocus on those controls as
well.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Thursday, May 22, 2008 3:06 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

 

Alex - I got the tabbing/enter key to work in the datagrid with your
suggestion. It took me a while to make it work. One last problem
(hopefully) - I have an Ok and Cancel button below the datagrid and when
I tab in the datagrid it never gets to these buttons. It's due to the
fact that event.preventDefault method is called to prevent editing of
the cell. How do I work around this? I am sending you sample code where
you can reproduce this behavior. I wouldn't have made it this far
without your suggestions. I appreciate all your help. 

 

Pratima

 

 





http://www.adobe.com/2006/mxml"; width="100%"
height="100%">

 









 

 









 





  

   

   

   



 





 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, May 20, 2008 2:31 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

 

Maybe if you keep track of the last editedItemPosition you can tell if
the user is tabbing or not.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Tuesday, May 20, 2008 1:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

I have one more question - I changed the code in the disableEditing
function and added another condition (in bold below). This breaks when
you enter the return key in the datagrid. I know why this is happening.
Is there another way to handle cell editing where tab and return key
works when you enable or disable specific cells? The reason I ask is
that I built a database query tool in Flex and I have a Create Table GUI
where a user can insert column name, data type, length, precision,
scale, primary key etc in the grid. Based on the datatype (VARCHAR,
BIGINT, NUMERIC etc) the user selects I have to disable length,
precision or scale.  I used the approach below and it works fine as long
as you don't tab or use the return key. Based on Alex's suggestion I got
the tab to work but the return key doesn't work. I'm thinking that maybe
this approach is not the right way to go but we are 2 weeks away from
going into production and I don't want to redesign the GUI this late in
the game.





http://www.adobe.com/2006/mxml"; width="100%"
height="100%">









 









 





  

   

   

   









From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pratima Rao
Sent: Tuesday, May 20, 2008 10:19 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

Thanks - that worked!!



size=2 width="100%" align=center tabIndex=-1> 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, May 20, 2008 7:52 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Datagrid cell editing question

You'd have to set editedItemPosition



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of pratima_jrao
Sent: Monday, May 19, 2008 5:00 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Datagrid cell editing question

Hi,

I have an application where I prevent users from editing certain cells
in a datagrid. I am using the itemEditBeggining event and when the
event gets triggered I call the event.preventDefault() method if the
cell should not be edited. 

The problem with this approach is that the tab functionality doesn't
work. I am attaching a snippet of code from the adobe site from where
I used this approach. Here is the link too if you want to play with
the example datagrid.
http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.htm
l
<http://livedocs.adobe.com/flex/3/html/help.html?content=celleditor_8.ht
ml> 

Do you folks have an idea about how to make tab work in the datagrid?
so it skips the cell that shouldn't be edited and jumps to the next
cell that can be edited? Any suggestions or ideas on this will be
highly appreciated.

Thanks,

Pratima



http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> ">