Submit all data Row in Table

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
In renderCustomButton I want submit all data row to action but the object's properties always comes null
except the Id, and when decorate the action as [httppost], button click never find the action and goes the "page not found"
4 years ago
When you render a custom button, you can write a function which returns a button with onclick function. in that function you can make a ajax call. Suppose you want the id and name from a data table.

function renderEditButton(data, type, row, meta) 
{
var result = "<button onclick = callEdit('"+ data + "','" + row.Name + "') class='btn btn-default'><i class='fa fa-pencil'>Edit</button>";

return result;
}


here 'data' is your 'id' and row.'Name' is the Name property of your model in the data Table.

After getting the value you just need to make a ajax call. If you need you can take the example from AllSettings.cshtml page( "Nop.Web\Areas\Admin\Views\Setting" ).

hope it will help you.Thanks.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.