Hi, in my blazor component i need to disable my grid when onload event is fired and enable it when the databound is fired.
How can achieve this?
Thanks
Stefano
|
<SfGrid DataSource="@Orders" @attributes="@GridAttributes" AllowPaging="true">
<GridEvents OnLoad="LoadHandler" DataBound="DataBound" TValue="Order"></GridEvents>
...
</SfGrid>
<style>
.e-grid[disable="yes"] {
opacity: .5;
pointer-events: none;
-ms-touch-action: none;
touch-action: none;
cursor: no-drop;
}
</style>
private Dictionary<string, object> GridAttributes { get; set; } = new Dictionary<string, object>();
...
public void LoadHandler()
{
GridAttributes.Add("disable", "yes");
}
public void DataBound()
{
GridAttributes["disable"] = "no";
}
|
Hi Renjith, your solution works very well, the only "problem" is the spinner because inherits the same css styles of the grid. It's possible to give evidence to the spinner ?
Thanks
Stefano
|
<style>
.e-grid .e-spinner-pane { /*hide the Grid spinner */
display: none;
}
</style>
|