Lena Posted November 9, 2015 Share Posted November 9, 2015 Hi. In MainModule (mobile project): /FireDAC/ FDConnection1->FDQueryOrgan->DataSetProviderOrgan->ClientDataSetOrgan->DataSourceOrgan In FDQueryOrgan->SQL: SELECT * FROM organizations ORDER BY name; In Main Form UnimDBList1: DataSource= UniMainModule.DataSourceOrgan DataField=name After press button Enter in Login Form my code in Main Form: void __fastcall TMainmForm::UnimFormBeforeShow(TObject *Sender) { UniMainModule()->FDQueryOrgan->Active = false; UniMainModule()->ClientDataSetOrgan->Active = false; UniMainModule()->FDQueryOrgan->Active = true; UniMainModule()->FDQueryOrgan->FetchAll(); UniMainModule()->FDQueryOrgan->First(); UniMainModule()->ClientDataSetOrgan->Active = true; UniMainModule()->ClientDataSetOrgan->Last(); UniMainModule()->ClientDataSetOrgan->First(); ShowMessage(IntToStr(UniMainModule()->ClientDataSetOrgan->RecordCount));//<-I see 2 } Main Form open but UnimDBList1 is empty. How get data in UnimDBList1? I need to see the data column name (DataField=name) in UnimDBList1. Please help advice. v. 1211. P.S. I try to use standart TUniDBLookupListBox/TUniDBLookupComboBox in mobile project but got error. Quote Link to comment Share on other sites More sharing options...
bugra Posted November 18, 2015 Share Posted November 18, 2015 Hi Kitty. UnimDBList isn't a Grid. It doesn't work like that. It's basically a ListBox. You should fill its items. You can use basic loop to do that. And remember, Because of It's a ListBox, if more than one of same name, add only one is proper use. Or You can use UniDBListGrid. Which is more easier and right way to do that Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted November 18, 2015 Administrators Share Posted November 18, 2015 As Buğra said, TUnimDBList & TUniDBList are same as TDBList in VCL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.