Thanks for the help.
Here is what I did when you were writing your reply:
Code Behind:
protected void ApplicantDataSource_PerformSelect(object sender, SD.LLBLGen.Pro.ORMSupportClasses.PerformSelectEventArgs2 e)
{
ApplicantDataSource.EntityCollection = MyApplicantEntity.FetchApplicants(e.PageNumber, e.PageSize);
ApplicantDataSource.DataBind();
}
protected void ApplicantDataSource_PerformGetDbCount(object sender, SD.LLBLGen.Pro.ORMSupportClasses.PerformGetDbCountEventArgs2 e)
{
e.DbCount = MyApplicantEntity.DbCount();
}
HTML Code:
<llblgenpro:LLBLGenProDataSource2 ID="ApplicantDataSource" runat="server" DataContainerType="EntityCollection" EnablePaging="True"
EntityFactoryTypeName="Fadv.Ehv2.BusinessLibrary.FactoryClasses.MyApplicantEntityFactory, Fadv.Ehv2.BusinessLibrary"
LivePersistence="False" OnPerformSelect="ApplicantDataSource_PerformSelect"
OnPerformGetDbCount="ApplicantDataSource_PerformGetDbCount">
</llblgenpro:LLBLGenProDataSource2>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="ApplId" DataSourceID="ApplicantDataSource" PageSize="25">
<Columns>
<asp:BoundField DataField="ApplId" HeaderText="ApplId" ReadOnly="True" SortExpression="ApplId" />
<asp:BoundField DataField="LName" HeaderText="LName" SortExpression="LName" />
<asp:BoundField DataField="FName" HeaderText="FName" SortExpression="FName" />
<asp:BoundField DataField="Dob" HeaderText="Dob" SortExpression="Dob" />
<asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" />
<asp:BoundField DataField="SsnPlainText" HeaderText="SsnPlainText" SortExpression="SsnPlainText" />
</Columns>
</asp:GridView>
I am assuming that in the PerformSelect method that I can call ApplicantDataSource.SelectParameters.Add() to add values into the SelectParameters collection. Then I am also assuming that I can then pass ApplicantDataSource.FilterToUse into my FetchMethod to perform programatic filtering on the fly. Are these assumptions correct?