|
Author: Jenny Nguyen
|
|
You can easily populate the DexExpress lookupedit control in C# by following these steps. YOu can use any of the method to connect to the database for example you can use Enterprise Library or .NET build in SQL client connection or even your own method of connection. private void PopulatePlants() { DataTable dtPlants = new DataTable();
DbHelper db = new DbHelper(); db.StoredProcedure = "dbo.prPlantsSelect"; dtPlants = db.GetDataTable(); db.Close();
// Make sure that the DisplayMember and Value Member is specified. cbPlant.Properties.DisplayMember = "Description"; cbPlant.Properties.ValueMember = "ID"; cbPlant.Properties.DataSource = dtPlants; }
|
wonderfull thanx