BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
When using the dialog box to update a task using dapper what event is called when save is pressed. Yes it updates the model but we want to send the request to the database.
We tried using the rowupdatedhandler but while it updates the record, it does not close the dialog box and freezes the page.
We spent hours on this, as it made no sense. 2 things ended up working.
1) We put out update query in a function and called it from the RowUpdatedHandler() function. This solved the problem, but begged the question why? Turns out that it was the sql command call (likely dapper related.)
2) The command was set for queryasync, and we suspect it was hanging because it was waiting for a record-set to be returned. Since this was an update statement, we changed the call in the service to execute vs queryasync, and doing so allowed us to call the service without using the secondary function.
Hope this helps others.
Hi Tony,
Greetings from Syncfusion
Support,
We are unable to replicate the issue
when dapper using with Gantt chart. We have attached an video for reference and
sample refer it.
Video reference: https://www.syncfusion.com/downloads/support/directtrac/general/ze/custom1021182171.zip
We have verified that the CRUD actions and taskbar edit actions are saving
properly in the database without freezing. We are using a service for database
for updating the data. We have attached the code sample for reference and
suggest using a separate service or controller for backend updates.
Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp-851887978.zip
public class CustomAdaptor : DataAdaptor { private readonly GanttDataAccessLayer _dataLayer; public CustomAdaptor(GanttDataAccessLayer dataAccessLayer) { _dataLayer = dataAccessLayer; } public override async Task<object> ReadAsync(DataManagerRequest dataManagerRequest, string key = null) { List<TaskModel.TaskInfoModel> records = await _dataLayer.GetEmplyoeeListAsync(); int count = records.Count(); return dataManagerRequest.RequiresCounts ? new DataResult() { Result = records, Count = count } : (object)records; } public override async Task<object> InsertAsync(DataManager dataManager, object data, string key) { await _dataLayer.AddEmployeeAsync(data as TaskModel.TaskInfoModel); return data; } public override async Task<object> UpdateAsync(DataManager dataManager, object data, string keyField, string key) { await _dataLayer.UpdateEmployeeAsync(data as TaskModel.TaskInfoModel); return data; } public override async Task<object> RemoveAsync(DataManager dataManager, object primaryKeyValue, string keyField, string key) { await _dataLayer.RemoveEmployeeAsync(Convert.ToInt32(primaryKeyValue)); return primaryKeyValue; } } |
Documentation reference in Grid:- https://blazor.syncfusion.com/documentation/common/data-binding/dapper-databinding
We request you to share more information to achieve your requirement. Kindly share the details below.
Once we receive this information, we will be better equipped to identify the
root cause of the issue and provide you with the necessary assistance.
Regards,
Ajithkumar G