CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

When connect to list source field no longer grows

by bob9999 » 17 May 2019 04:12

Hi there. I have a drop down that has static items I added for initial testing. The field was working great and growing as needed as more items were selected. I then attached to a List Data Source and then now the field no longer grows. How do I get the field to grow as the user selects more values? If this is not possible then I will have to preload the drop down with items rather than using a query and list data source. I thought it was a cool feature to just query the database rather than having to load all the items by manually. Also I am having an issue setting the initial state of the selected items from the values in the database. I tried to just assign the comma delimited select list directly but this seems to have no effect and drop down is always blank on first load. ddContactSearchTags.SelectedList.CommaText Cheers!
bob9999
 
Posts: 110
Joined: 18 Jan 2019 17:32

by bob9999 » 17 May 2019 18:14

Well I have tried setting JQDropDownOptions.SelectByValue(JSonObj); and JQDropDownOptions.SelectByValues(Array); and nothing works to preselect values to display these to the user when starting. In the demo is the complicated json way but this does not work in my environment and this is for the text representation and I want to use ID's or the number representation. I will continue batting my head against the wall here. All was going so nicely with this component until trying to do fancier things. Works great when no database connect and no initial selected state needed though. Cheers!
bob9999
 
Posts: 110
Joined: 18 Jan 2019 17:32

by bob9999 » 17 May 2019 23:13

OK, I figured out that the JQDropDownOptions.SelectByValue(JSonObj); and JQDropDownOptions.SelectByValues(Array) only work after the form is created. I was in the form create event setting up the screen and the selections have to be completed after. I moved to the form render event.

So now there is a difference when a data query drop down, then the statements above add the ID number to the select and that is what the user sees and when a static item dropdown, then the correct text values are displayed instead.

The only other outstanding issue on this thread is how do you get when data driven to auto grow like when there are just static items. SO the component seems to have different subtleties depending where the items are coming from.

The documentation may be good to update for this that these functions are non functional in the create form event unless I missed somewhere. Would have saved me 4 hours.

Cheers!
bob9999
 
Posts: 110
Joined: 18 Jan 2019 17:32


Return to JQDropDown

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.