columns

  • • required
  • • Type : [String] | [TColumn]
Basic columns
If we pass an array of String like this, [String] should be redered as follows.
Advanced columns
If we pass an array of Objects we can configure more options, [TColumn] should be redered as follows.
TColumn
Name Description Type Example
id
column ID String first_name
label
Header label string or HTML string '<i class="bm bm-mail" style="font-size:20px;" ><i >'
hidden
show or hide the column bool true or false , default true
showInColumSelection add the column in the column selection popover, see showColumnSelection bool true or false , default true
align align the label String left or right or center, default left
template function that renders the content of the cell, it pass the cell value and the row object, the return value can be String, HTML , DOM/Jquery Object function template : function(cell_value,row){ return '<i class="bm bm-mail" style="font-size:20px;" ><i >' }
Apis
Name Description Example
bmGrid('show column',String | [String,...])
Show one or multiple culumns by its id $('#grid').bmGrid('show column','first_name')
bmGrid('hide column',String | [String,...])
Show one or multiple culumns by its id $('#grid').bmGrid('hide column',['first_name','email']])