0

I have a requirement where i need place textbox in the cell and enter the value and have to read the value on submitaction. I have tried writing the code like below...

     field : 'costCenter',
      name : "Cost Center",
     width : '180px',
    height : '20px',
    styles : "text-align: center;",
cellStyles : "text-align: left;font-weight: normal;",
   classes : 'grid_header_title',
  editable : true,
      type : dojox.grid.cells.DateTextBox,
        formatter: function(item){
            var txt= new dijit.form.TextBox();
        return txt;

this doesn't work for me. Can any one help me?

j.w.r
  • 4,136
  • 2
  • 27
  • 29
yarra
  • 43
  • 1
  • 6

1 Answers1

1

This will palce a textbox in your datagrid

    var _count = 0;
{
    field      : 'costCenter',
    name       : "Cost Center",
    style      : "width: 180px; height: 20px; text-align: center;",
    editable   : true,
    type       : dojox.grid.cells._Widget,
    formatter  : function(){
       return new dijit.form.TextBox({
         id: "id_"+_count++
       });
    }
}
JohannesAndersson
  • 4,550
  • 2
  • 17
  • 30