Locking of records for editing in multiuser applications

In a multiuser application, is there a way when using a Grid to lock a record for editing by other users when a user is busy editing a record? 


1 Reply

RS Renjith Singh Rajendran Syncfusion Team May 5, 2022 02:25 AM UTC

Hi Fouche,


Greetings from Syncfusion support.


You can prevent editing action in Grid by cancelling the edit actions using args.Cancel inside OnActionBegin event handler. Please refer the code below,


 

   <GridEvents OnActionBegin="OnActionBegin" TValue="Order"></GridEvents>

   

public void OnActionBegin(ActionEventArgs<Order> args)

    {

        if (args.RequestType.Equals(Action.BeginEdit))

        {

            //prevent edit action

            args.Cancel = true;

        }

    }

 


References :

https://blazor.syncfusion.com/documentation/datagrid/events#onactionbegin

https://blazor.syncfusion.com/documentation/datagrid/editing#event-trace-while-editing


Regards,

Renjith R


Loader.
Up arrow icon