Dear All,
Could you please help me ...
I have 2 tables from Database, here are the detail (example);
Employee table:
1. ID as (primary key, auto increment)
2. Name
3. Age
Detail:
1. ID (primary key)
2. Employee_ID
3. Address
4. Email
5. Title
6. Department
By executing query, i want to show the content of Employee Table, so that i want to show, Name and Age in the list. (not with the ID)
And by clicking row in the list, i want to get the ID of the Employee row, and this ID will be used to query the detail.
What i usually do is, executing query, and put "name" and "age" value to the twolineLayout listview. (Because i do not want to show the ID). After that i execute query by using "where" clause with Name and age as parameters to get the ID of first table. Then i use this ID to get the detail on the second table.
My question is:
Is there a simpler solution so that when i populate employee table, i can hide the ID field or creating map between ID and "Name" so that every time i click the listview i can get the ID( without executing query to find the ID). Is there other "listview like" component that can handle this?
Your help is very appreciated
Thanks All..
Best Regards
Could you please help me ...
I have 2 tables from Database, here are the detail (example);
Employee table:
1. ID as (primary key, auto increment)
2. Name
3. Age
Detail:
1. ID (primary key)
2. Employee_ID
3. Address
4. Email
5. Title
6. Department
By executing query, i want to show the content of Employee Table, so that i want to show, Name and Age in the list. (not with the ID)
And by clicking row in the list, i want to get the ID of the Employee row, and this ID will be used to query the detail.
What i usually do is, executing query, and put "name" and "age" value to the twolineLayout listview. (Because i do not want to show the ID). After that i execute query by using "where" clause with Name and age as parameters to get the ID of first table. Then i use this ID to get the detail on the second table.
My question is:
Is there a simpler solution so that when i populate employee table, i can hide the ID field or creating map between ID and "Name" so that every time i click the listview i can get the ID( without executing query to find the ID). Is there other "listview like" component that can handle this?
Your help is very appreciated
Thanks All..
Best Regards