Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
Interface a second DataColumn drop down |
Thu, Apr 28 2016 7:37 AM | Permanent Link |
Trinione | Hi:
I am creating a new component and need a second column like the DataColumn drop down that is tied to the currently selected DataSet. Let's call it DataColumnNextField. How can this be accomplished? |
Thu, Apr 28 2016 9:07 AM | Permanent Link |
Trinione | Attached is a demo with the interface file included.
NOTE, 'New York' does not appear in the drop down, but the value is stored in the StringList. Is this the result of a bug, or an error in my code? Attachments: TL27ButtonComboBox.zip |
Thu, Apr 28 2016 9:48 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | << Is this the result of a bug, or an error in my code? >>
It's an error in your code. Your BuildDropDown should look like this: procedure TL27ButtonComboBox.BuildDropDown; begin DataSet.DisableControls; try Items.Add(''); sl.Add('0'); with DataSet do begin First; while not EOF do begin Items.Add(Columns[DataColumn].AsString); sl.Add(Columns[DataColumnID].AsString); Next; end; end; ItemIndex := 0; finally DataSet.EnableControls; end; end; You're essentially binding a column to the same dataset that you're navigating in this method. Tim Young Elevate Software www.elevatesoft.com |
Thu, Apr 28 2016 10:37 AM | Permanent Link |
Trinione | Tim:
Yep! That worked. Thanks. << ... a second column like the DataColumn drop down that is tied to the currently selected DataSet >> In my demo, how can the DataColumnID property drop-down appear like the DataColumn property drop-down? I have spent quite a bit of time trying to get this to do so, but to no avail. |
This web page was last updated on Friday, September 13, 2024 at 03:42 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |