Hi,
I'm new to using uniGUI and using Sencha. Currently I am developing an application using a UnimDBGrid and I need to add a drop down button to one of the columns.
I have tried a couple different approaches but none of them are quite working out. I was hoping someone would be kind enough to see what I might be doing wrong and provide some tips.
My first attempt used the UniSession.AddJS call to add a new column and used the renderer procedure to add the necessary html code:
UniSession.AddJS('var column = Ext.create(''Ext.grid.column.Column'', { text: ''Action'', width: 70, '
+ 'renderer: function(value, metadata, record) {return ''<div class="dropdown"></div>''}});'
+ 'frmInspectEntry.gridEquipment.getHeaderContainer().insert(frmInspectEntry.gridEquipment.getColumns().length, column);'
+ 'frmInspectEntry.gridEquipment.refresh();');
This just shows the html as plain text in the grid.
For my second attempt I tried to use a template instead, but the cell just appears blank. UniSession.AddJS('var column = Ext.create(''Ext.grid.column.Column'', { text: ''Action'', width: 70, '
+ 'xtype: ''templatecolumn'', tpl: ''<tpl><div class="dropdown"></div><tpl>''}); '
+ 'frmInspectEntry.gridEquipment.getHeaderContainer().insert(frmInspectEntry.gridEquipment.getColumns().length, column);'
+ 'frmInspectEntry.gridEquipment.refresh();');
Any guidance would be greatly appreciated