Jump to content

Issue with TUniCheckComboBox ItemSeparator


JamesP

Recommended Posts

Hi,

I have tried to implement something similar what exists in demo (checkcmbo or FormControlsCheckComboBox):
"Grid with CheckComboBox editor".
Even in the demo it works a lit of bit strange (ItemSeparator = ";" for UniCheckComboBox3 (UniHiddenPanel2)) the value is shown like "E; A; C", but when you start to edit the column "Data" of UniDBGrid2 it shows value like "E, A, C" (comma separated and not semi-column).
When you finish edit, let say we added "F", firstly it shows "E, A, C, F", but when you move to another row it becomes "E; A; C; F".

If you replace from ";" to "," or any other character for property ItemSeparator in UniCheckComboBox3 (UniHiddenPanel2) it won't work at all. What I mean is: 
Try to edit Data column in UniDBGrid2, it will appear CheckComboBox then select several options and after clicking on other row the value disappear.

Could you please suggest any way to work around as I need to use comma for separator and not default semi-column?

Could you please provide the solution to this issue?

I use Complete_Professional_1.90.0.1551. Desktop mode.

Kind Regards

Link to comment
Share on other sites

57 minutes ago, JamesP said:

Hi,

I have tried to implement something similar what exists in demo (checkcmbo or FormControlsCheckComboBox):
"Grid with CheckComboBox editor".
Even in the demo it works a lit of bit strange (ItemSeparator = ";" for UniCheckComboBox3 (UniHiddenPanel2)) the value is shown like "E; A; C", but when you start to edit the column "Data" of UniDBGrid2 it shows value like "E, A, C" (comma separated and not semi-column).
When you finish edit, let say we added "F", firstly it shows "E, A, C, F", but when you move to another row it becomes "E; A; C; F".

If you replace from ";" to "," or any other character for property ItemSeparator in UniCheckComboBox3 (UniHiddenPanel2) it won't work at all. What I mean is: 
Try to edit Data column in UniDBGrid2, it will appear CheckComboBox then select several options and after clicking on other row the value disappear.

Could you please suggest any way to work around as I need to use comma for separator and not default semi-column?

Could you please provide the solution to this issue?

I use Complete_Professional_1.90.0.1551. Desktop mode.

Kind Regards

Hello

Can you try below code?

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  with UniCheckComboBox3, JSInterface do
  begin
    JSConfig('delimiter', [ItemSeparator]);
  end;
end;

 

Link to comment
Share on other sites

3 hours ago, Hayri ASLAN said:

Hello

Can you try below code?


procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  with UniCheckComboBox3, JSInterface do
  begin
    JSConfig('delimiter', [ItemSeparator]);
  end;
end;

 

Hello,

Thank you for your respond.

I have tried this, but it hasn't made any difference.

I found why it did not work for me. The issue was in my Items, there are spaces in the options:

Apple 1

Cherry 2

.....

When I deleted the spaces and made them:

Apple1

Cherry2

.......

It started working properly.

It would be great if there is any way to work with Items where there are some spaces, for exapmle:
Option 1
Option 2
......
Choice 23

And have ItemSeparator = ","

 

Thank you in advance.

Kind Regards.
 

 

 

Link to comment
Share on other sites

2 minutes ago, JamesP said:

Hello,

Thank you for your respond.

I have tried this, but it hasn't made any difference.

I found why it did not work for me. The issue was in my Items, there are spaces in the options:

Apple 1

Cherry 2

.....

When I deleted the spaces and made them:

Apple1

Cherry2

.......

It started working properly.

It would be great if there is any way to work with Items where there are some spaces, for exapmle:
Option 1
Option 2
......
Choice 23

And have ItemSeparator = ","

 

Thank you in advance.

Kind Regards.
 

 

 

Hello

can you please make a test case?

Link to comment
Share on other sites

13 hours ago, Hayri ASLAN said:

Hello

can you please make a test case?

Hello,

Here it is the test case for ItemSeparator = "," (comma) and Items with space between words/symbols.

uniDBGrid1 has 5 columns:
ID, Name, Description, DataValue1 (Option with spaces), DataValue2 (Option no spaces).

There is no issue with DataValue2 (Option no spaces) at all, it works nice and smooth.

The issue is with DataValue1 (Option with spaces):
When you edit it first time and select several option it works. Then if you click again for editing it blanks value out and shows the option list without previous selections.

Kind Regards

TestCaseItemSeparator.zip

Link to comment
Share on other sites

  • 1 month later...

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