I restarted Visual Studio and this allows me to build and run the application. However I get a Object Reference Not Set error which as usual doesn't tell anything.
Added: I can create an implementation for the _esSelect event. Where I create a new collection, call LoadAll() and then set it to e.Collection. However sorting doesn't work and it just doesn't feel right.
In this scenario, when I edit the esDataSource properties, the reference to the assembly is gone, but the EntityName and fieldnames are preserved in the dialog.
This is a new project for testing and it is really basic. I'll add my code to make sure:
Code:
<cc1:esDataSource ID="esDataSource1" runat="server" />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="SiNumber,PnmMain,PnmKey" DataSourceID="esDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="SiNumber" HeaderText="SiNumber" ReadOnly="True"
SortExpression="SiNumber" />
<asp:BoundField DataField="PnmMain" HeaderText="PnmMain" ReadOnly="True"
SortExpression="PnmMain" />
<asp:BoundField DataField="PnmKey" HeaderText="PnmAutoKey" ReadOnly="True"
SortExpression="PnmAutoKey" />
<asp:BoundField DataField="Pn" HeaderText="Pn" SortExpression="Pn" />
<asp:BoundField DataField="Description" HeaderText="Description"
SortExpression="Description" />
<asp:BoundField DataField="InspectionType" HeaderText="InspectionType"
SortExpression="InspectionType" />
<asp:BoundField DataField="InspectionNotes" HeaderText="InspectionNotes"
SortExpression="InspectionNotes" />
<asp:BoundField DataField="Time" HeaderText="Time" SortExpression="Time" />
<asp:BoundField DataField="Serial" HeaderText="Serial"
SortExpression="Serial" />
<asp:BoundField DataField="Qty" HeaderText="Qty" SortExpression="Qty" />
<asp:BoundField DataField="SbType" HeaderText="SbType"
SortExpression="SbType" />
</Columns>
</asp:GridView>If i remove the esDataSource and bind the Grid in code (page_load), it just works:
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim dsInspList As New BLL.IntranetApuInspectionCollection
dsInspList.LoadAll()
GridView1.DataSource = dsInspList
GridView1.DataBind()
End Sub