• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

having components based on Data Grid's column value.

 
Steven Rodeo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have the following code snippet, here I am able to change the label of the button based on the Data Grid's Column value. I am unable to think of a way where I can add two completely different buttons, based on Data Grid's value. Any help will be greatly appreciated.

_SM



 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where do you want to add the two buttons. Can you elaborate further
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope you want to implement two different functionalities based on status of iflag.
I such is the case, you neednt have to go in for two different buttons as one could do the job.
 
Steven Rodeo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically I have two buttons X and Y, all I want to do is, if the value is true I would like to show ButtonX / if false I want to show ButtonY

 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose the two buttons you use are the 'check' and 'delete' buttons.
Why don't you use single button with different functionalities for true and false cases.
this approach might be easy to implement i guess
 
Steven Rodeo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I don't know how to do that, I tried but doesn't work for me. I mean the same button with different functionalities
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could easily do it by using a if condition. You can use then MouseEvent for the same.



I have written this code according to your code snippet. It Works for me. hope this would be helpful to you
 
Steven Rodeo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thank you soo much!. that works great.

I have a follow up question, what's wrong with this code ?





 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is your issue with this code.
 
Steven Rodeo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wont' compile
 
Ashwin Sridhar
Ranch Hand
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have messed up with Single quotes i guess.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic