Dec 19, 2014, 6:43 PM
[OPEN] [#618] CheckboxSelectionModel's AllowDeselect not working
On version 2.x, it was possible to deselect a record when CheckboxSelectionModel's AllowDeselect is set to true.
But on version 3.x, it's not possible to deselect the record when CheckboxSelectionModel's AllowDeselect is set to true.
But on version 3.x, it's not possible to deselect the record when CheckboxSelectionModel's AllowDeselect is set to true.
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager runat="server" ScriptMode="Debug" />
<ext:GridPanel ID="_grd" Title="Ext.Net" Width="500" Height="500" runat="server">
<Store>
<ext:Store AutoLoad="true" ID="_str" runat="server">
<Proxy>
<ext:AjaxProxy Url="/Example/LoadFakeRecords/">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader Root="data" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model IDProperty="ID" runat="server">
<Fields>
<ext:ModelField Name="ID" Type="String" />
<ext:ModelField Name="Name" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column Text="ID" DataIndex="ID" runat="server" />
<ext:Column Text="Name" DataIndex="Name" runat="server" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:CheckboxSelectionModel Mode="Single" AllowDeselect="true" runat="server" />
</SelectionModel>
</ext:GridPanel>
</body>
</html>
namespace SandBox.Controllers
{
public class ExampleController : System.Web.Mvc.Controller
{
public ActionResult Index()
{
return View();
}
public StoreResult LoadFakeRecords()
{
List<Person> lst = new List<Person>();
for (int index = 0; index < 15; index++)
{
lst.Add(new Person
{
ID = index,
Name = "Name" + index,
});
}
return new StoreResult(lst, lst.Count());
}
}
[Serializable]
public class Person
{
public int ID { get; set; }
public string Name { get; set; }
}
}
Last edited by Daniil; Dec 21, 2014 at 3:34 PM.
Reason: [OPEN] [#618]