llblgenprodatasource and show all records

Posts   
 
    
Karim
User
Posts: 14
Joined: 17-Dec-2007
# Posted on: 17-Dec-2007 17:10:44   

Hi,

I want to be able to show all records from an llblgenprodatasource. This is the code:


<asp:DropDownList ID="ddlFilterContact" runat="server" AutoPostBack="True">
<asp:ListItem Text="0" Value="0"></asp:ListItem>
<asp:ListItem Text="2"></asp:ListItem>
<asp:ListItem Text="1"></asp:ListItem>
</asp:DropDownList>

        <llblgenpro:LLBLGenProDataSource ID="LLBLGenProDataSource1" runat="server" DataContainerType="EntityCollection"
            EntityCollectionTypeName="DataObjects.CollectionClasses.CommunicatieCollection, DataObjects"
            OnPerformSelect="LLBLGenProDataSource1_Selected" SortingMode="ClientSide">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddlFilterContact" Name="TypeContact" 
                    PropertyName="SelectedValue" Type="String" />
            </SelectParameters>
        </llblgenpro:LLBLGenProDataSource

When the filter is NULL, i want it to show all records. Just like the SqlDatasource has a ISNULL() function that can be used.

Thanks in advance for your effort.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Dec-2007 03:53:33   

Hi Karim,

There's no a direct way to do that. In this case you have two options:

A. Use this workaround: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7480

B. Use livepersistence = false and implement by yourself the filter criteria at PerformSelect method using the L**LBLGenDataSource2.FilterToUse **property at Page_Load event to specify the filter you want.

David Elizondo | LLBLGen Support Team
Karim
User
Posts: 14
Joined: 17-Dec-2007
# Posted on: 20-Dec-2007 16:46:06   

daelmo wrote:

Hi Karim,

There's no a direct way to do that. In this case you have two options:

A. Use this workaround: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7480

B. Use livepersistence = false and implement by yourself the filter criteria at PerformSelect method using the L**LBLGenDataSource2.FilterToUse **property at Page_Load event to specify the filter you want.

Thanks.