Pull data from one Array based on data in first Array

  • Thread starter Thread starter kieran
  • Start date Start date
K

kieran

Hi,

I have a string Array called Groups and this has x number of groups.
Each row of the Array is divided up by ';' and has the name of the
group in the second position (i.e. after the first ';') and then x
number of values all divided by ';'. All these subsequent values are
the IDs of the contacts of the group

I then have a second string Array called Contacts and this has x number
of contacts.
Each row of the Contacts Array is divided by ';' and has the ID of the
contact first and the mobile number of the contact in the third
position (i.e. after the second ';')

I want to put the Group names into a drop down and dependent on the
group name picked...pull the mobile numbers of the Contacts of that
Group into a string.

I can get the Group names into the drop down but am unsure how to pull
the information from the second Array based on the Group name selected.

I know i have probably explained this badly but if anyone understands
and could give me some pointers, it would be much appreciated.

Thanks....
 
kieran said:
Hi,

I have a string Array called Groups and this has x number of groups.
Each row of the Array is divided up by ';' and has the name of the
group in the second position (i.e. after the first ';') and then x
number of values all divided by ';'. All these subsequent values are
the IDs of the contacts of the group

I then have a second string Array called Contacts and this has x number
of contacts.
Each row of the Contacts Array is divided by ';' and has the ID of the
contact first and the mobile number of the contact in the third
position (i.e. after the second ';')

I want to put the Group names into a drop down and dependent on the
group name picked...pull the mobile numbers of the Contacts of that
Group into a string.

I can get the Group names into the drop down but am unsure how to pull
the information from the second Array based on the Group name selected.

I know i have probably explained this badly but if anyone understands
and could give me some pointers, it would be much appreciated.

Thanks....

I would think of breaking up your array (at least the second one) and
put it in a datatable. This way you can filter the datatable in a
dataview based on the selected in combobox1. Then apply the filtered
dataview to the datasource of the second combobox.


Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top