Jump to content


andry

Member Since 06 Dec 2015
Offline Last Active Dec 11 2015 12:16 AM
-----

Topics I've Started

some small question, suggestion and wishes

09 December 2015 - 10:42 AM

Hi,

here some question and suggestion:

 

= TNxComboBox6:=
-provide a sorted property
-is border displayed incorrectly in Delphi XE8? (see attached images)
 
= TNxLabel6 =
I don't find in next6
 
= TnxGroupBox =
for completition I whish a gropubox with some nice feature like styles, inside optional header/title and so on...
 
 
 
at next time....
 

DBGRID Sql Sort

06 December 2015 - 01:09 PM

Hi, 

I'm trying to use NextSuite6 and I begin with this problem:

 

 

in Version 5 (TNextDBGrid) I done so and work fine:

 

// this script is used with NexusDB database but I think can be used also with other one

procedure TfrmMain.dbGridAnagPreviewSortColumn(Sender: TObject; ACol: Integer;
  Ascending: Boolean);
var  DirectionStr: string;
begin
  if dbGridAnagPreview.Columns[ACol].FieldName = '' then Exit;
  if Ascending then DirectionStr := 'ASC' else DirectionStr := 'DESC';
  DataModule1.nxQueryAnagPreview.Close;
  DataModule1.nxQueryAnagPreview.SQL.Text := changeSQLOrder(DataModule1.nxQueryAnagPreview.SQL.Text,    //<<<< 'changeSQLOrder' function change ORDER in sql script 
                                                dbGridAnagPreview.Columns[ACol].FieldName + ' ' + DirectionStr);
  DataModule1.nxQueryAnagPreview.Open;
end;
 
In version 6 (TNextDBGrid6) I'm doing so (I don't know if is the right method!) but doesn't work (I get an access violation))
procedure TfrmMain.NextDBGrid61SortQuery(Sender: TObject; Index: Integer;
  SortKind: TNxSortKind; var Accept: Boolean);
var sFld : string;
begin
    sFld := (NextDBGrid61.Columns[Index] as TNxDBTextColumn6).DataBinding.FieldName;
    nxQuery1.Close;
    nxQuery1.SQL.Text := _changeSQLOrder(nxQuery1.SQL.Text,
            sFld +
            _sif(SortKind = skDescending, '', ' DESC'));
    nxQuery1.Open;
end;
 

Can SomeOne help me?

 

Thanks