May 05, 2016, 1:06 PM
Focusable LoadMask
On the following example, focus grid's view during its load. The Load Mask is focusable, so it shows a border.
Thanks in advance
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager ScriptMode="Debug" Theme="Crisp" runat="server" />
<ext:GridPanel ID="_grd" Border="true" Title="Ext.NET" Width="500" Height="500" runat="server">
<Store>
<ext:Store AutoLoad="true" runat="server">
<Proxy>
<ext:AjaxProxy Url="~/Example/LoadFakeRecords/" StartParam="start" LimitParam="limit" PageParam="page">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader RootProperty="data" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model IDProperty="ID" runat="server">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Name" />
</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>
</ext:GridPanel>
</body>
</html>
namespace SandBox.Controllers
{
public class ExampleController : System.Web.Mvc.Controller
{
public ActionResult Index() => View();
public StoreResult LoadFakeRecords(int start, int limit, int page)
{
Thread.Sleep(TimeSpan.FromSeconds(100));
List<Person> lst = new List<Person>();
for (int index = start; index < (page * limit); index++)
{
lst.Add(new Person
{
ID = index,
Name = $"Name - {index}"
});
}
return new StoreResult(lst, (page * limit) + limit);
}
}
public class Person
{
public int ID { get; set; }
public string Name { get; set; }
}
}
On the following example, grid's view is masked manually, and that mask is not focusable.<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
</head>
<body>
<ext:ResourceManager ScriptMode="Debug" Theme="Crisp" runat="server">
<Listeners>
<DocumentReady Handler="Ext.net.Mask.show(App._grd.view);" />
</Listeners>
</ext:ResourceManager>
<ext:GridPanel ID="_grd" Border="true" Title="Ext.NET" Width="500" Height="500" runat="server">
<Store>
<ext:Store AutoLoad="false" runat="server">
<Proxy>
<ext:AjaxProxy Url="~/Example/LoadFakeRecords/" StartParam="start" LimitParam="limit" PageParam="page">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader RootProperty="data" />
</Reader>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model IDProperty="ID" runat="server">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Name" />
</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>
</ext:GridPanel>
</body>
</html>
Is that the expected behaviour, the Load Mask be focusable? In my opinion, no mask should be focusable.Thanks in advance
Last edited by RaphaelSaldanha; May 05, 2016 at 1:11 PM.