Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top