Hi,
I think you can find what you need in this example. Here, you can see how we create new action in xml called 'deleteaction', and then, how it in 'OnAction' method handle what should be done:
userGrid.OnAction += OnAction;
private void OnAction(string actionName, object actionArgument)
{
switch (actionName.ToLower())
{
case "deleteaction":
// Code for deleting the user by the actionArgument which is the passed UserID
UserInfoProvider.DeleteUser(ValidationHelper.GetInteger( actionArgument, 0));
// Repopulate the UniGrid with the new data
userGrid.DataSource = (CMS.SiteProvider.UserInfoProvider.GetAllUsers());
break;
}
}
Best regards,
Dragoljub