View Full Version : [CLOSED] Set Button-toogle in gridpanel

Sep 12, 2013, 5:56 AM
how can i use toogle button in gridpanel column?

Thanks in advance

Sep 12, 2013, 7:39 AM
Hi @legaldiscovery,

You can use a ComponentColumn.

<ext:ComponentColumn runat="server">
<ext:Button runat="server" EnableToggle="true" Text="Toggle" />

However, it is not enough. A toggle state will be erased if refresh the GridPanel (for example, it happens after sorting). So, you might need to maintain the Buttons' state. For that you can define an individual ModelField. Record a Button's state in that ModelField when that Button is being clicked. You can restore that state in a ComponentColumn's Bind listener. It should fire on each refresh of the GridPanel.