Jump to content

UniDBGrid with button column - It this possible?


stiaan
 Share

Recommended Posts

Hi

 

Is it possible to have a button column in the UniDBGrid? (I have searched the forums with no success.)

 

My requirement is simple: I want to popup another form after the button has been pushed on the DBGrid, obviously using the data from the DBGrid in the popup form.

 

Your help is much appreciated!

 

Regards

Stiaan

Link to comment
Share on other sites

Hi

 

I have added this code to the reconfigure EXTJS Event. I get the button but the callback seems to be the issue when the button is pressed:

function reconfigure(sender, store, columns, oldStore, the, eOpts)
{
    //Add progress bar
  columns[2].width = 110;
  columns[2].renderer = function (v, m, r) { var id = Ext.id();Ext.defer(function () {Ext.widget('progressbar', { renderTo: id, value: v / 100, width: 100 });}, 50);return Ext.String.format('<div id="{0}"></div>', id);};

 //Add button
  columns[3].width = 110;
  columns[3].renderer = function (v, m, r) {
      var id = Ext.id();
      Ext.defer(function () { Ext.widget('button', {
           xtype: 'actioncolumn',
           renderTo: id,
           text: 'Check',
           width: 100,
           handler: function (grid, rowIndex, colIndex) {                         
                     //Ext.Msg.alert("hallo there!" + grid);
                     //var rec = grid.getStore(); //.getAt(rowIndex);
                     Ext.Msg.alert("hallo there2!" , "hallo");
                     return;
                  }
            });
          }, 50);
          return Ext.String.format('<div id="{0}"></div>', id);
      };

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...