SF Datagrid problem with events OnActionBegin/OnActionComplete not triggered from toolbar

Hello
I suppose I have problem which is related to that I am new with Blazor and Syncfusion
I have followed examples on this forum and several helps and documentation on this site ( fx thread 153106)
and I get data to grid  sorting filtering even delete, add and edit seems to work almost till the end
I suppose that this is some simple newbie syntax / logic error but now I need help, I do not see that error

Attached is the page, it is simple class with 4 fields data is coming from classlibrary which gets it from SQL server
to list of,  and that is it, edit mode is normal

Sorting and Filtering triggers OnActionBegin and OnActionComplete events as they should
but edit, delete, update buttons on toolbar do not.
delete even removes item from grid but it does not trigger event to remove it from database

Finally I added handler to event OnToolbarClick and this fired on these grid toolbar buttons
but with out this handler it seems nothing happens. It may be that it does something "in house" but I would
like to make CRUD also do database and what I have read it should be as easy as write handler to OnActionBegin event
when grid edit mode is normal

Core 3.1.3 and Syncfusion Blazor 18.1.0.46

Best regards
Jukka Tervonen

Attachment: Tuoteryhmät_779675f3.zip

3 Replies

RN Rahul Narayanasamy Syncfusion Team April 29, 2020 11:40 AM UTC

Hi Jukka, 
 
Greetings from Syncfusion. 
 
Query: SF Datagrid problem with events OnActionBegin/OnActionComplete not triggered from toolbar 
 
We have validated your query and checked the reported problem at our end. We could not reproduce the reported problem at our end. Find the below sample for your reference. 
 
 
If you are still facing the same problem, then reproduce the reported problem in the provided sample if possible. It will be helpful to validate and provide a better solution. 
 
Regards, 
Rahul 



JT Jukka Tervonen April 29, 2020 04:55 PM UTC

Hi Rahul,

Thanks cause you did not point me clear syntax error I made one amateur conclusion.

It seems to me now that problem was that I was linking data to list of Interface of object
grid it self I suppose could handle this cause data was shown and it was working almost
but event trigger does not understand Interface of class
As I now cloned data from list of Interface to local identical copy of original class one to one
and gave list of these to grid data source now events are fired as they should

Now this makes my life little bit harder cause I have move data between classes every time
read or write it to database ( I do not want to change logic of db connection of library or write new one cause it is all ready at use with other projects) 

If you have time would you check if my guess is right and it would be wonderful if it would work directly with these
and it is more than possible that I use Interfaces with Blazor some how wrong but this is way that some more experienced
people have told me to do it

Best Regards,
Jukka




RN Rahul Narayanasamy Syncfusion Team April 30, 2020 02:44 PM UTC

Hi Jukka, 

Thanks for sharing the details. 

We have validated your query and we are able to reproduce the reported problem while binding Grid DataSource as interface of objects. As of now, we could not bind the list of interface of objects as Grid DataSource. We have considered this “need to provide support for binding grid datasource as interface of object” as an feature and added this feature request to our database. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
 

This feature will be included in our upcoming Volume 2, 2020 release. Until then we appreciate your patience.  
 
Until then we suggest you to bind the Grid DataSource as class of objects. 
 
Regards, 
Rahul 
 


Loader.
Up arrow icon