tags:

views:

290

answers:

1

I am trying to get the dojo button that is within the data grid to use styling. Currently it does not use the styling.

HTML:

<table dojoType="dojox.grid.DataGrid" class="soria" id="grid1" jsId="grid1" elasticView="2" store="theStore" selectionMode="single" query="{grid1:'*'}">
  <thead>
     <TR>
       <th field="0" formatter="getButton">Show value</th>
     </tr>
  </thead>

javascript:

function getButton(item){
   return "<button class=/"soria/" dojoType=\"dijit.form.Button\" onClick=\"\">Button</button>";
}
A: 

You need to provide more info as suggested - like is this being utilized within the custom dijit framework or are you jsut trying to produce a button didjit on the fly?

Im going to assume the later for now so...

1.) You need to reparse the element if you want dynamically added elements created outside the dijit infrastructure to be turned into dijits.

2.) #1 doesnt make sense because if you are doing it on the fly you should be using the javascript programmiatc creation and adding it to the DOM instead of just returning html, ie: return new dijit.Form.Button()

prodigitalson