Andy,
I have used nested repeaters for a long time with CSLA and they work just fine.
Your idea is 100% correct - add the 2nd repeater in the Item Template of the first.
In rptr1_ItemDataBound you have to have code like this:
'call this after all the values in the main repeater are set.
'ItemDataBound will then run for all the values in the nested repeater.
mFilteredList = GetDataSource(mKey)
Then you need a function like this:
Protected Function GetDataSource(ByVal key As Integer) As ObjectListViewNote:
The ObjectListView filtering is slower than Rocky's FilteredBindingList. It allows multi-property sorting and I want to use it for both sorting and filtering. But if you have large lists that get filtered often, you may want to use Rocky's instead.
I also handle rptr2_ItemDataBound and assign values to the controls. (I use a lot of hyperlinks and find it easier to handle in code.)
Something like this:
Protected Sub rptrData_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs)
If e.Item.ItemType = ListItemType.Item OrElse e.Item.ItemType = ListItemType.AlternatingItem Then
Dim mIndex As Integer = e.Item.ItemIndex
Dim mObjInColl As SomeType = CType(mFilteredList.Item(mIndex).Object, SomeType)
Dim oHylNumber As HyperLink = CType(e.Item.FindControl("hylNumber"), HyperLink)
oHylNumber.NavigateUrl = "Win('SomePage.aspx?keyvalue=" & mObjInColl.key & "&viewtype=1','MyScreen',600,500);"
oHylNumber.Text = mObjInColl.Number
etc.
Joe
Hi,
I am working with an older version of CSLA - version 1.51 (upgraded for .NET 2.0 to be exact). I haven't purchased the books on 2.0 or 3.0 yet. Unfortunately, I don't have the luxury of time right now to learn and upgrade.
I am trying to accomplish nested repeaters similar to this example. Actually, what I would like to do is have something that looks like this blog: http://chrisdodd.com/blog. Specifically, I would like to have a repeated list (with paging) on the outside and on the bottom of each post display a list of categories it belongs to. The category list should be horizontal but wrap when it gets to the end of the available space. Given the fact that there are no ObjectListView or FilteredBindingList objects in my version of the framework, is something like this still possible with CSLA and ASP.NET?
I have been playing with this trying to get it working, but can't seem to find a solution.
By the way, the post - category relationship is many to many with a database table to resolve the relationship.
NightOwl888
Copyright (c) Marimer LLC