In my jsfiddle, what happens is the user clicks on the “Open Grid” link and select an option. The option value is then displayed in the textbox. Now if you open the grid again you would see the option you have chosen turns green. Now this works for options “3” to “21”. But for options “22”, “23”, “24” all the way to the “Yes or No” options if you select them, the value is shown in the textbox but the option does not turn green when you open up the grid.
Why is this.
The code is in a jsfiddle, click here
First, I think it happens because you have duplicate
idproperty. That’s only for numbers.Second, if you want to turn buttons with text ‘Yes or No’ and ‘True or False’ you should change the behavior of this peace of code:
$("#btn" + value).addClass("gridBtnsOn");I’ve updated your fiddle.