danieljpayne
New member
- Joined
- Aug 7, 2007
- Messages
- 4
- Programming Experience
- 1-3
Hi, could anyone please help me with some dependent list boxes or grid views. I have a table in an access database which contains the names of categories and their subcategories and am trying to fill a list box or grid view with the list of categories and then have a second list box or grid view contain all the subcategories filtered by which ever category the user has selected.
I'm currently trying to do this with grid views and have the two sets of data filling the grid views but it takes forever to fill when there are only 262 subcategories in total. My method of populating them is probably the culprit.
. Btw I tried setting the data sources of the grid views but none of the data would show up.
Can someone please explain the most efficient way to do this?
Many Thanks
Daniel
I'm currently trying to do this with grid views and have the two sets of data filling the grid views but it takes forever to fill when there are only 262 subcategories in total. My method of populating them is probably the culprit.
VB.NET:
For count = 0 To Me.TblCategoriesTableAdapter.GetUniqueGroupList.Rows.Count - 1
dvGroups.Rows.Add(Me.TblCategoriesTableAdapter.GetUniqueGroupList.Item(count).Group)
Next count
For count = 0 To Me.TblCategoriesTableAdapter.GetUniqueCategoryList.Rows.Count - 1
dvCategory.Rows.Add(Me.TblCategoriesTableAdapter.GetUniqueCategoryList.Item(count).Group, Me.TblCategoriesTableAdapter.GetUniqueCategoryList.Item(count).Category)
Next count
. Btw I tried setting the data sources of the grid views but none of the data would show up.
Can someone please explain the most efficient way to do this?
Many Thanks
Daniel