Hi!
I'm having a problem with a CheckBoxList when a PostBack occurs. In fact, I am using a ManyToManyListRelationship on that form that controls which checkboxes are checked. On the form, I also have a DropDownList that is used to modify the WhereClause of the ReferenceMember DataSource. When a PostBack occurs, the CheckBoxList selections are getting lost.
Here is a siplified example of what I want to do. Let's say that you have a list of clients and a list of items they can order. A Many-to-Many Relationship releated both lists. Then you have a FormView that can be used to list items bought by a client. The FormView is tied to a single client and it contains a CheckBoxList with all items. The items that are checked are the ones that the client ordered. On the form, there is also a DropDownList used to filter the items list by category. To control the checked items of the CheckBoxList, I am using a ManyToManyListRelationship. The Items DataSource is the ReferenceMember DataSource, and it can be filtered. For example, let's say that the items list is containing books and CD's. Using the DropDownList, it is possible to narrow it down to only books or only CD's. The DropDownList does an AutoPostBack and there is code-behind to modify the WhereClause of the Item DataSource. For this example, the Item DataSource would look like something similar to:
<data:ItemDataSource ID="dsItems"
runat="server"
Sort="ItemName"
SelectMethod="GetPaged"
>
<Parameters>
<asp:ControlParameter Name="WhereClause"
ControlID="__Page"
PropertyName="whereClause" />
</Parameters>
</data:ItemDataSource>Well, the problem is the following: When the AutoPostBack occurs (when using the DropDownList), the list gets filtered properly, and I only see either de books or the CD's, but none of them are check anymore. The ManyToManyListRelationship.UpdateControl method does not get called. I am wondering if this is a bug in .netTiers or if there is something like a DataBind() missing in my code.
Cheers!
JF