Hello guys,
I'm trying to implement a CRUD datagrid with fluxor, but I've run in a several problems... Also this is my first main, project and I'm really struggling here.
The code can be found here: https://github.com/dbogdangabriel/Corebuild/tree/State_management/Development/Blazor_WA_Sync_Fluxor/Blazzor_Wa_Sync_Fluxor.Todos
1. First, I want to update the data right from the grid, therefore I've created with GridEvents an action to open a new short window to view the data and update it. Sadly I'm getting Argument2: cannot convert from 'method group' to 'EventCallback'.
2. For the second problem at the moment I've got a second page to route to the "user page details" when a user click on the data from a normal C# table. But I'm afraid that I don't understand this topic very well to implement it with Syncfusion.
I tried few things for both problems but nothing ... Any help is welcome.
Thank you!
Hi Bogdan,
Greetings from Syncfusion.
Currently we are validating the reported query at our end. We will update further details within two business days on or before 14th September, 2022.
Until then we appreciate your patience.
Regards,
Monisha
Hi Bogdan,
Thanks for the patience.
Query: “I want to update the data right from the grid, therefore I've created with GridEvents an action to open a new short window to view the data and update it. Sadly I'm getting Argument2: cannot convert from 'method group' to 'EventCallback'.”
We have checked your query and we would like to inform that we need to defineTvalue for the Grid events. So the mentioned issue occurs. We have modified your sample. Kindly check the attached sample for your reference.
|
<GridEvents OnActionBegin="ActionBeginHandler" OnActionComplete="ActionCompleteHandler" TValue="TodoDto"></GridEvents> |
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Corebuild-1112453558.zip
Query: “For the second problem at the moment I've got a second page to route to the "user page details" when a user click on the data from a normal C# table. But I'm afraid that I don't understand this topic very well to implement it with Syncfusion.”
We don’t see any sample level issues. It is perfect. We could able to reproduce the same issue in our WASM application. We are currently validating the issue further at our end. We will update further details within two business days on or before September 16, 2022. Until then we appreciate your patience.
Regards,
Monisha
Hi Bogden,
Thanks for the patience.
Query: “For the second problem at the moment I've got a second page to route to the "user page details" when a user click on the data from a normal C# table. But I'm afraid that I don't understand this topic very well to implement it with Syncfusion.”
We have checked your shared query and we are able to reproduce the reported issue when using it inside default html table using anchor tag. We suggest you to overcome the reported behavior by setting onclick:preventDefault in anchor tag. Kindly check the attached code snippet for your reference.
|
<tbody> @foreach (var todo in Employees) { <tr style="cursor: pointer;" class="text-center"> <td>@todo.EmployeeID</td> <a rel='nofollow' href="#" @onclick="()=> Navigate(1)" @onclick:preventDefault>call</a>
</tr> } </tbody> </table>
@code{
private void Navigate(int Employee) { UriHelper.NavigateTo($"todos/{Employee.ToString()}"); }
|
|
<GridColumn Field=@nameof(TodosState.Value.CurrentTodo.UserId) HeaderText="UserId" CustomAttributes="@(new Dictionary<string, object>(){ { "class", "e-attr" }})" Width="50"> </GridColumn> <GridColumn HeaderText="Todo profile" TextAlign="TextAlign.Center" Width="120"> <Template> @{ var TodoView = (context as TodoDto); <div><a rel='nofollow' href="#" @onclick="@(() => NavigateToTodoDetail(TodoView.Id))" @onclick:preventDefault>View</a></div> } </Template> </GridColumn>
</GridColumns> |
Please let us know if you have any concerns.
Regards,
Monisha