Jump to content

How to config Unicombobox to show multi columns


MVakili

Recommended Posts

8 hours ago, MVakili said:

I cant find any sample about multiple fields in 
C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop

\FMSoft\Framework\uniGUI\Demos\Desktop\ComboBox Remote Data

For example, the same demo. You can use OnRemoteQuery, OnRemoteQueryEx events.

Link to comment
Share on other sites

9 hours ago, Sherzod said:
\FMSoft\Framework\uniGUI\Demos\Desktop\ComboBox Remote Data

For example, the same demo. You can use OnRemoteQuery, OnRemoteQueryEx events.

Thank you for your answer, but I could not use it.
I need it to display several columns when it opens, and after selection, I can display the value of one of the columns as an answer and receive the entire selected answer as a string.
Like when you click on a column in a grid and select a record

Link to comment
Share on other sites

57 minutes ago, MVakili said:

I need it to display several columns when it opens, and after selection, I can display the value of one of the columns as an answer and receive the entire selected answer as a string.
Like when you click on a column in a grid and select a record

Well, I understand you.

Link to comment
Share on other sites

NOT tested.. maybe something like this ?

function beforeInit(sender, config)
{
  config.listConfig={
        getInnerTpl: function() {
            var tpl = '<table width="100%">'+
                     '<tr>'+
                            '<td style="vertical-align:top;width:100%">'+
                            '<div><span style="font-weight:bold;">{name} {middlename} </span><span style="float:right;color:blue">{lastname}</span></div>'+
                           '</td>'+
                     '</tr>'+
                    '</table>';
            return tpl;
        }
    };
}

Link to comment
Share on other sites

On 9/20/2022 at 11:51 AM, MVakili said:

Thank you for your answer, but I could not use it.
I need it to display several columns when it opens, and after selection, I can display the value of one of the columns as an answer and receive the entire selected answer as a string.
Like when you click on a column in a grid and select a record

May be this can give you an idea:

http://forums.unigui.com/index.php?/topic/9570-when-will-unicombobox-support-value/&do=findComment&comment=50674

 

Link to comment
Share on other sites

1 hour ago, Sherzod said:

Could you make a simple testcase to reproduce your case?

I noticed the bug
'8' must be part of items to use in text

so I wrote 

TUniComboBox(Sender).items.clear;

 TUniComboBox(Sender).items.add('8'); 

 TUniComboBox(Sender).itemIndex:=0;

TUniComboBox(Sender).Text:='8';

 

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