asp.net.netrazordatatablenopcommerce

How can I render multiple button in Column property?


I have a Entity DataTable.

   ColumnCollection = new List<ColumnProperty>
   {
             new ColumnProperty(nameof(ProductChapterMappingModel.Id))
       {
           Title = T("Admin.Common.Edit").Text,
           Width = "200",
           ClassName =  NopColumnClassDefaults.Button,
           Render = new RenderButtonsInlineEdit()
       }
   }

In the web view it is displaying like

enter image description here

This looks good but my requirement is to add another button called Details under the same column like:

enter image description here

How can I do that?


Solution

  • You can use

    Render = new RenderCustom("ColumnBtns")
    

    and then

    function ColumnBtns(data, type, row, meta) {
            return 'Your HTML HERE'
           //and you can use the parameter row to reference the object represented by the   
           //row such as Id like that (row.Id)
        }