![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 10 of 16 total |
![]() |
Wed, Oct 28 2015 2:40 PM | Permanent Link |
squiffy Telemix Ltd. | I have the following String s :
{"rows":[{"name":"System Admin","id":1},{"name":"Client Admin","id":2},{"name":"Client Stats","id":3 }]} (passes json validator here and looks right - cut & paste : http://jsonlint.com/) and I'm doing myDataSet.Open; myDataSet.LoadRows(s); and I get no errors. So far so good. I have a TButtonCombo control bound to this dataset. All that happens after the load is the combo is blank (the initial "Caption" string is deleted which is how I know its doing *something*) The dataset is set correctly. The Datacolumn is set correctly to "name" The dataset itself has two items, id (int) and name (string) Why on earth does that not load? Am I missing an obvious step? I use this technique all the time for grids. |
Wed, Oct 28 2015 2:53 PM | Permanent Link |
squiffy Telemix Ltd. | attached is a sample project with it happening.
Any help gratefully received as I've been staring at this for 3 hours. Nearly out of hair as it is ... Attachments: combodatasettest.zip |
Wed, Oct 28 2015 4:00 PM | Permanent Link |
Raul ![]() | On 10/28/2015 2:40 PM, squiffy wrote:
> I have a TButtonCombo control bound to this dataset. All that happens after the load is the combo is blank (the initial "Caption" string is deleted which is how I know its doing *something*) > The dataset is set correctly. > The Datacolumn is set correctly to "name" > The dataset itself has two items, id (int) and name (string) > Why on earth does that not load? Am I missing an obvious step? I use this technique all the time for grids. Did a quick test and seeing same here - no items in combo. I have a dataset attached to a tgrid and TButtonComboBox and seeing data in grid properly so dataset is open and has data. TEditComboBox similarly has an issue - it updates the displayed active record value but does not allow dropdown (list empty). Need Tim to take a look. Raul |
Wed, Oct 28 2015 4:02 PM | Permanent Link |
squiffy Telemix Ltd. | Thanks Raul. Nice to know I'm not going mad!
I've worked around it for now by manually populating the list from the DS. |
Wed, Oct 28 2015 4:25 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | << Why on earth does that not load? Am I missing an obvious step? I use this technique all the time for grids. >> If you don't have any items defined for the combo box, then the button combo box won't display any text because the database column's value doesn't match any values in the button combo box. Tim Young Elevate Software www.elevatesoft.com |
Wed, Oct 28 2015 4:26 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Raul,
<< TEditComboBox similarly has an issue - it updates the displayed active record value but does not allow dropdown (list empty). >> If there are no items in the list for the TEditComboBox, then what I see here is a small, empty drop-down list, as expected. IOW, I'm not seeing anything wrong here with either the TButtonComboBox or TEditComboBox. Tim Young Elevate Software www.elevatesoft.com |
Wed, Oct 28 2015 4:29 PM | Permanent Link |
squiffy Telemix Ltd. | So how do I populate an empty combo box from a dataset?
|
Wed, Oct 28 2015 4:35 PM | Permanent Link |
squiffy Telemix Ltd. | Sorry Tim, I'm clearly missing something here.
If the dataset gets loaded from the json string and the combo box is databound to it, and the datacolumn is set to the correct json field, shouldnt that do it? How else should I set up the combo box, as i dont have any data for it until the json is returned? |
Wed, Oct 28 2015 4:43 PM | Permanent Link |
Raul ![]() | On 10/28/2015 4:26 PM, Tim Young [Elevate Software] wrote:
> IOW, I'm not seeing anything wrong here with either the TButtonComboBox or TEditComboBox. Tim, Then i'm confused as to how to use TButtonComboBox DataSet and DataColumn fields and/or what they mean. I looped thru the dataset and added all the string items into the combo Items collection - doing it manually is big PITA though. Now whenever I navigate with grid the TButtonComboBox text does change. I can also select drop down and i see all entries. However i can't seem to change the current record from TButtonComboBox - clicking entry in drop down does nothing (now that might be a table index issue - the int value is primary index not string). Raul |
Wed, Oct 28 2015 8:56 PM | Permanent Link |
Raul ![]() | On 10/28/2015 4:43 PM, Raul wrote:
> Then i'm confused as to how to use TButtonComboBox DataSet and > DataColumn fields and/or what they mean. Tim, Never mind - i was looking at it wrong. Doh! In dataset browse mode it essentially acts as display (label) only - as long as value is in the Item list. If dataset is in edit mode you can use it to update value for the linked dataset field and set it to one of the values in the item list. Raul |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Wednesday, April 23, 2025 at 06:31 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |