JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Blazor Grid, Custom command handling example › Reply To: Blazor Grid, Custom command handling example
September 15, 2023 at 11:18 am
#108689
ivanpeevski
Participant
Hi Oliver,
Here is how you can use the OnCommand property to capture the command and the clicked row:
@using Newtonsoft.Json.Linq;
<Grid DataSource=”@Clients” Editing=”@editing” OnCommand=”OnCommand”>….</Grid>
@code{
….
private void OnCommand(object obj)
{
dynamic commandObject = JObject.Parse(obj.ToString());
string commandName = (commandObject[“name”]).ToObject();
int commandRowId = (commandObject[“id”]).ToObject();
}
}
Best Regards,
Ivan Peevski
Smart UI Team
https://www.htmlelements.com/
- This reply was modified 1 year, 1 month ago by ivanpeevski.
- This reply was modified 1 year, 1 month ago by ivanpeevski.