2

I have two "delete" button on top of a grid, one is red another is gray. When no row selected, the button is the gray one. Otherwise, it shows the red one. How to do that using Extjs4?

LLL
  • 23
  • 3

1 Answers1

0

Listen select event of grid - hide gray, show red. After reloading grid, or if grid store becomes empty - do the opposite. But if think you must use one button with css styles for disabled/enabled controls and setDisabled method. Cause logically it's two states of the one button.

Damask
  • 1,754
  • 1
  • 13
  • 24