Hi!
I have a ManyToManyListRelationship with a Reference Member bound to a DataSource (GroupeDataSource) that can be filtered. The ListControl is a CheckBoxList. When the DataSource is not filtered (Select All Groups), everything is working fine. However, if with the filter, only a portion of the Groups are displayed in the CheckBoxList, even Groups that are not displayed are affected by the ManyToManyListRelationship. Is this normal?
For example, let's say that we have the following CheckBoxList:
-
- *
- *
-
- *
Where the numbers represent the Group IDs and the asterisks represent the selected items based on the LinkMembers. And let's say that I use a filter to only display the items with an even numbered ID in the CheckBoxList:
2. *
4.
Then, when the Save button is clicked, even odd-numbered items that are not displayed in the CheckBoxList will be affected, and when the CheckBoxList will be displayed again without being filtered, we will see the following:
-
- *
-
-
-
I would have expected the odd-numbered items to remain untouched.
ManyToManyListRelationship:
<data:ManyToManyListRelationship
ID="ClientClientGroupeRelationship"
runat="server">
<PrimaryMember ID="PrimaryMember1"
runat="server"
DataSourceID="ClientDataSource"
EntityKeyName="ClientID"
/>
<LinkMember ID="LinkMember1"
runat="server"
DataSourceID="ClientGroupeDataSource"
EntityKeyName="ClientID"
ForeignKeyName="GroupeID"
/>
<ReferenceMember
ID="ReferenceMember1"
runat="server"
DataSourceID="GroupeDataSource"
ListControlID="cblGroupes"
EntityKeyName="GroupeID"
/>
</data:ManyToManyListRelationship>
Reference Member DataSource:
<data:GroupeDataSource ID="GroupeDataSource"
runat="server"
EnableSorting="false"
SelectMethod="GetAll"
>
<Parameters>
<data:SqlParameter Name="WhereClause"
UseParameterizedFilters="false">
<Filters>
<data:GroupeFilter Column="GroupeTypeID" ControlID="ddlGroupeTypes" />
</Filters>
</data:SqlParameter>
</Parameters>
</data:GroupeDataSource>
Is it a bug or the normal behavior of the ManyToManyListRelationship? If it is the normal behavior, how can have a CheckBoxList with only a subset of the elements in cases where the whole set is too large?
Cheers!
JF