Feb 09, 2015, 4:16 PM
[FIXED] [#723] GridView's DisableSelection
On the following example,
On version 2.x, it works as expected.
GridView's DisableSelection
(Line 37) is set to true
, but selection is not disabled.On version 2.x, it works as expected.
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager runat="server" />
<ext:GridPanel Title="Ext.Net" runat="server" Width="200">
<Store>
<ext:Store AutoLoad="true" runat="server">
<Proxy>
<ext:AjaxProxy Url="~/Example/LoadFakeRecords/">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader RootProperty="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" />
<ext:ModelField Name="LastName" Type="String" />
<ext:ModelField Name="Address" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column Text="ID" DataIndex="ID" Width="100" runat="server" />
<ext:Column Text="Name" DataIndex="Name" Width="100" runat="server" />
</Columns>
</ColumnModel>
<View>
<ext:GridView DisableSelection="true" />
</View>
</ext:GridPanel>
</body>
</html>
namespace SandBox.Controllers
{
public class ExampleController : System.Web.Mvc.Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Index2()
{
return View();
}
public StoreResult LoadFakeRecords()
{
List<Entity> lst = new List<Entity>();
for (int index = 0; index < 15; index++)
{
lst.Add(new Entity
{
ID = index,
Name = string.Format("Name - {0}", index),
LastName = string.Format("Last Name - {0}", index),
Address = string.Format("Address - {0}", index)
});
}
return new StoreResult(lst, lst.Count());
}
}
[Serializable]
public class Entity
{
public int ID { get; set; }
public string Name { get; set; }
public string LastName { get; set; }
public string Address { get; set; }
}
}
Last edited by fabricio.murta; Apr 27, 2016 at 2:44 AM.