Jump to content

DBGrid PagingBar: Add SpinEdit in code


andyhill

Recommended Posts

This is how I add a datefield to a TUniDBGrid pagingbar, please show me how to add a spinedit field - thanks in advance.

               '    { ' +
               '      xtype: "datefield", ' +
               '      fieldLabel: "", ' +
               '      formatText: "From Date", ' +
               '      labelWidth: "0px", ' +
               '      format: "d/m/Y", ' +
               '      value: new Date(), ' +
               '      id: "_grdFromDate_", ' +
               '      width: 120, ' +
               '      startDay: 1, ' +
               '      listeners: ' +
               '      { ' +
               '        change: function(el, v) ' +
               '        { ' +
               '          ajaxRequest(MainForm.MyGrid, "_grdFromDate_", ["dtIndx=0", "val=" + Ext.Date.format(v, "d/m/Y")]) ' +
               '        } ' +
               '      } ' +
               '    }, ' +

Link to comment
Share on other sites

Thanks Sherzod, all good except tooltip is not working, any ideas ?

               '    { ' +
               '      xtype: "numberfield", ' +
               '      width: 40, ' +
               '      tooltip: "Count", ' +
               '      value: '+IntToStr(Count)+', ' +
               '      listeners: ' +
               '      { ' +
               '        change: function(el, v) ' +
               '        { ' +
               '          ajaxRequest(MainForm.gAddresses, "_grdCount_", ["val=" + v]) ' +
               '        } ' +
               '      } ' +
               '    }, ' +
 

Link to comment
Share on other sites

Thanks Sherzod, This is my implementation:-

               '    { ' +
               '      xtype: "numberfield", listeners: {render: function(c) {new Ext.ToolTip({target : c.getInputId(), html: "Rows"})}}, '+
               '      width: 40, ' +
               '      value: '+IntToStr(GridPageCount)+', ' +
               '      listeners: ' +
               '      { ' +
               '        change: function(el, v) ' +
               '        { ' +
               '          ajaxRequest(MainForm.gAddresses, "_grdNumberOfRows_", ["val=" + v]) ' +
               '        } ' +
               '      } ' +
               '    }, ' +
               '    { ' +
               '      xtype: "tbseparator" ' +
               '    }, ' +

No errors but also no hint ?

 

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.

×
×
  • Create New...