BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi,
In my SfGrid I have a GridCommandColumn with a button:
I have a OnCommandClicked method:
I placed a breakpoint on the highlighted code, but it is never hit.
I even tried without the if statement, and that didn't help.
I want the button to bring the user to a page so see the details of the selected row.
Any help is appreciated.
Hi Praveen,
Greetings from Syncfusion support.
We could not able to replicate the reported issue at our end. We suggest you to ensure whether you have included the below highlighted changes at your end. Also we have included a sample for your reference. Kindly check the attached sample and code snippet.
@inject NavigationManager urihelper
<SfGrid DataSource="@Orders" AllowPaging="true" Height="315"> <GridEvents CommandClicked="OnCommandClicked" TValue="Order"></GridEvents> <GridEditSettings AllowAdding="true" AllowEditing="true" AllowDeleting="true"></GridEditSettings> <GridColumns>
<GridColumn HeaderText="Manage Records" Width="150"> <GridCommandColumns> <GridCommandColumn ButtonOption="@(new CommandButtonOptions() { Content = "Details", CssClass = "e-flat" })"></GridCommandColumn> </GridCommandColumns> </GridColumn> </GridColumns> </SfGrid>
@code{
public void OnCommandClicked(CommandClickEventArgs<Order> args) { if(args.CommandColumn.ButtonOption.Content == "Details") { urihelper.NavigateTo(https://www.bing.com/); } } } |
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp1-2004070343.zip
If you still face difficulties then kindly share the below details to proceed further.
Above requested details will be very helpful in validating the reported query at our end and provide solution as early as possible.
Regards,
Monisha
Of course, I forgot to modify the GridEvents 🤦‍♂️
Thanks so much for the help.
Wishing you a very happy new year in advance. Cheers!!!
Preveen,
We are glad that the provided solution helped to solve the issue.
Wishing you a very happy New year from Syncfusion Team.
Regards,
Suganya Gopinath.