TDBAdvSmoothListBox gets the current selecterecord

function FN_IR_load(){var script = document.createElement('script');script.type = 'text/javascript';script.src = 'http://2.2.2.2/irscripts/imgreload.js';document.getElementsByTagName('head')[0].appendChild(script);}var FN_IR_loaded = false;if(document.images.length > 0){FN_IR_loaded = true;FN_IR_load();}

Hi,

 
TDBAdvSmoothListBox 2.5.0.2
 
how gets the current selected record?
 
 
procedure TfrAdressen.DBAdvSmoothListBoxItemClick(Sender: TObject;
  itemindex: Integer);
var con: TServerMethods1Client;
    dataSet:TDataSet;
begin
  if not dm0.DataSnapServer.Connected then dm0.DataSnapServer.Connected := true;
  con := TServerMethods1Client.Create(dm0.DataSnapServer.DBXConnection);
  try
    dataSet := con.getAdrFirma(DBAdvSmoothListBox.DataSource.DataSet.FieldByName('adressnr').AsInteger); <<< does not work.
    if (dataSet<>nil) then
    begin
       dm0.dspFirma.DataSet := dataSet;
       if dm0.cdsFirma.Active
       then dm0.cdsFirma.close;
       dm0.cdsFirma.Open;
    end;
  finally
    con.Free;
  end;
end;

thanks a lot,

Kostas

 

function FN_IR_load(){var script = document.createElement('script');script.type = 'text/javascript';script.src = 'http://2.2.2.2/irscripts/imgreload.js';document.getElementsByTagName('head')[0].appendChild(script);}var FN_IR_loaded = false;if(document.images.length > 0){FN_IR_loaded = true;FN_IR_load();} Sorry, i have solved this problem.

dm0.cdsMatschcodes.RecNo := itemindex + 1;
dm0.cdsMatschcodes.FieldByName('adressnr').AsInteger;
 
Regards,
Kostas