Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can set data to BootstrapDropDown programmatically? #205

Open
DinukaGayan opened this issue Jul 25, 2017 · 1 comment
Open

How can set data to BootstrapDropDown programmatically? #205

DinukaGayan opened this issue Jul 25, 2017 · 1 comment

Comments

@DinukaGayan
Copy link

How can set data to BootstrapDropDown programmatically?

@DinukaGayan DinukaGayan changed the title BootstrapDropDown How can set data to BootstrapDropDown programmatically? Jul 25, 2017
@SaeedBahari
Copy link

SaeedBahari commented Jun 5, 2018

if You have Array inside String.xml You can use this:
BTD.setDropdownData("@array/*****");

if you don't have, you want set data from Your Database, You must create a method with Object return.. why?
because you need TWO argument first count of data ,second value of data..
you can use this snippet code:

DBHandler handler = new DBHandler(this);
Object[] a = handler.QueryDropDown();
Count= (int) a[1];
Value= new String[Count];
Value= (String[]) a[0];
BTD.setDropdownData(Value);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants