I attached a sample project.
We have closed this ticket because another page addresses its subject:
TcxBarEditItem with TdxOfficeSearchBoxProperties no longer shows a modified NullString if TdxBarManager's AlwaysSaveText property is TrueTcxBarEditItem with TdxOfficeSearchBoxProperties no longer shows a modified NullString if TdxBarManager's AlwaysSaveText property is True
Answers approved by DevExpress Support
Hello,
Thank you for the project.
Do you mean that once you enter and erase a string, the editor no longer shows NullString? If so, this behavior is related to basic mechanisms: editor text becomes an empty string. Refer to the following discussion regarding this issue: Problem with NullString on ButtonEdit added on tdxBar. As a possible workaround, you can handle the OnChange event (it is public but not published) and assign null
explicitly.
Delphiprocedure TForm1.DoChange(Sender: TObject);
begin
if not (Sender is TdxOfficeSearchBox) then
Exit;
if TdxOfficeSearchBox(Sender).EditingText = '' then
TdxOfficeSearchBox(Sender).EditValue := null;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
TdxOfficeSearchBoxProperties(cxBarEditItem1.Properties).OnChange := DoChange;
end;
No. Just click search box with mouse and then leave it. don't push any key. you will see the exact problem.
Hello,
We will examine this issue and update the following thread once we have news: TcxBarEditItem with TdxOfficeSearchBoxProperties no longer shows a modified NullString if TdxBarManager's AlwaysSaveText property is True.
In the meantime, could you please test the workaround I recommended in my previous post?
Note: our editors do not show NullString when they are focused.
Hello Alex,
That's exactly what I meant!
And yes, The workaround you suggested works well. Thank you!