Home > Back-end >  How can I render multiple button in Column property?
How can I render multiple button in Column property?

Time:05-17

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 call Details under the same coulmn like:

enter image description here

How Can I do that??

CodePudding user response:

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)
    }

  • Related