Jump to content

UniDBLookupComboBox - Hint for items from database field.


Recommended Posts

 

  // OnCreate event

  with UniDBLookupComboBox2 do
  begin
    ClientEvents.UniEvents.Values['beforeInit'] :=
      'function beforeInit(sender, config) {'+
      '    config.listConfig = {'+
      '        tpl: new Ext.XTemplate('+
      '            ''<tpl for="."><div class="x-boundlist-item" style="'+ Font.ToStyleString(True) +'" data-qtip="{[this.getHint(values)]}">{[this.getVal1(values)]}</div></tpl>'', {'+
      '                disableFormats: true,'+
      '                getVal1: function(values){return values.val.substring(0, values.val.indexOf("====>>>>"))},'+
      '                getHint: function(values){return values.val.substring(values.val.indexOf("====>>>>")+8)}'+
      '            }'+
      '        )'+
      '    };'+
      '}';

    JSInterface.JSConfig('displayTpl', [JSInterface.JSStatement('Ext.create("Ext.XTemplate",''<tpl for=".">'',''{[this.getVal(values)]}'', ''</tpl>'', {getVal: function(values){return (values.val.indexOf("====>>>>")>-1?values.val.substring(0, values.val.indexOf("====>>>>")):values.val)}})')])
  end;

 

  • Like 2
Link to comment
Share on other sites

Hi Sherzod,

thank you.

But in 99% of cases we need a grid in the popup, or the result formatted as a grid, with titles for the columns (we can also have 4-5 fields) and with items from a dataset.
And especially with the filter when inputting characters.
Always asked for and never got.
Yet Unigui is very powerful… 🙂
 

Link to comment
Share on other sites

1 hour ago, Stemon63 said:

But in 99% of cases we need a grid in the popup, or the result formatted as a grid, with titles for the columns (we can also have 4-5 fields) and with items from a dataset.

Well, this will also be implemented in future versions I hope.

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...