For last 2 day I'm fighting with DBAdvSmoothListBox. Your compoenents are awsome and really widly customizeable and your examples + doc helps in 90% of issues, but no I'm not able find out, why my ListBoxes are not able to show nvarchar(max) data fields. Only (WIDEMEMO) is shown. I know about this similar issues with TDbGrid (but I still cant handle the problem)
My config: RAD Studio 10.2, FireDAC datasets, MSSQL
What I tryed:
implement ItemDraw method - NOK
implement onGetText method of TFIeld - NOK
Set PageMode = false - this helps but leads in lost synchronization between ListBox and dataset itself + few issues which I can handle but ... you know :)
Hi, PageMode is a different way of presenting the data, it jumps between pages, that's why scrolling is forced to move to the next page as soon as the buffer end has been reached. You can for example set the buffercount of the dataset to a number that is twice the amount of items you are visually seeing in the listbox to smoothen the transition between pages.
Unfortunally yesterday we upgraded to 10.3 Rio and the issue with (WIDESTRING) apeared again. I'm almost sure that its not a TMS issue, but I hope (and please :) ) you can help me.
when I assign OnGetText method to fields which are WideMemo dateType the handling method is not triggered :-(
When I compile the same code in 10.2.1 it works fine :// Thanks for help:
Code snippet follows:
procedure TForm2.FormCreate(Sender: TObject);
begin
query := TFDQuery.Create(self);
query.Connection := FDConnection1;
query.AfterOpen := myAfterOpen;
DataSource1.DataSet := query;
query.SQL.Add('SELECT * FROM EC_NOTIFICATIONS WHERE User = 9103');
query.Active := True;
end;
procedure TForm2.myAfterOpen(aDataset: TDataset);
begin
for var I := 0 to aDataset.Fields.Count-1
do begin
if(aDataset.Fields.DataType in [ftWideMemo, ftWideString])
then begin
aDataset.Fields.OnGetText := myOnGetText;
end;
end;
end;
procedure TForm2.myOnGetText(aSender: TField; var text: string;
It's unclear exactly what is happening on database level, but perhaps this can be reported as a QC, as this is clearly a RAD Studio Rio issue. There is unfortunately very little that we can do to fix this issue.