insert dojo button inside a table cell

insert dojo button inside a table cell

hernanhernan Posts: 3Questions: 0Answers: 0
edited November 2012 in General
Hello,

i want to insert a dojo button inside a datatable cell.


Option#1, insert a funcion that will call another function when ready (not working atm):

{ "fnRender": function ( oObj, sVal ) {



return "( function(x){ alert(x) })($$id);".render({id: sVal}); }, "aTargets": [ 5]
},

Option#2, insert a dojo combobuttom, somehow like this (not working atm):
{ "fnRender": function ( oObj, sVal ) {

var menu = new Menu({ style: "display: block;"});
var menuItem1 = new MenuItem({
label: "Yahoo",
onClick: function(){ alert('hi'); }
});
menu.addChild(menuItem1);

var menuItem2 = new MenuItem({
label: "Google",
onClick: function(){ alert('ho'); }
});
menu.addChild(menuItem2);

var button = new ComboButton({
label: "get all mail",
dropDown: menu
});
}, "aTargets": [ 5]
},
button.placeAt(lojas-dns-$$id');

Replies

  • hernanhernan Posts: 3Questions: 0Answers: 0
    So whats the correct way to accomplish this ?
  • allanallan Posts: 63,133Questions: 1Answers: 10,399 Site admin
    fnRender is string based (as well is being deprecated). You want to use fnCreatedCell to manipulate the cells and possibly mRender or sDefaultContent to put something into the cell in the first place.

    Allan
This discussion has been closed.