M
Monty
[ASP.Net 2005]
Hi, I have a grid like so:
<asp:GridView ID="grdItemActivity" runat="server" ><Columns>
<asp:BoundField DataField="TransactionType" HeaderText="Type"
ReadOnly="True" />
<asp:BoundField DataField="DocumentNumber" HeaderText="Doc. No."
ReadOnly="True" />
<asp:BoundField DataField="Location" HeaderText="Location" ReadOnly="True"
/>
<asp:BoundField DataField="Quantity" HeaderText="Qty" ReadOnly="True" />
<asp:BoundField DataField="QuantityOnOrder" HeaderText="Committed"
ReadOnly="True" />
<asp:BoundField DataField="AmountPerUnit" HeaderText="Cost/Unit"
ReadOnly="True" />
<asp:BoundField DataField="DateAdded" HeaderText="Added" ReadOnly="True" />
<asp:BoundField DataField="DateModified" HeaderText="Modified"
ReadOnly="True" />
</Columns></asp:GridView>
Which I bind like so:
Dim oDS As System.Data.DataSet = Item.GetItemActivity(miItemID, Param1,
Param2)
grdItemActivity.DataSource = oDS '[have also tried: oDS.Tables(0) ]
grdItemActivity.DataBind()
On the DataBind(), I receive the error message "System.Data.DataRowView'
does not contain a property with the name 'ID'." That is correct, the
results don't have a field called "ID", but I'm not referencing any field
called ID in my GridView. WTH? I also tried removing ALL columns and setting
autogeneratecolumns = true, but I still get the same exact error. What am I
missing? TIA.
Hi, I have a grid like so:
<asp:GridView ID="grdItemActivity" runat="server" ><Columns>
<asp:BoundField DataField="TransactionType" HeaderText="Type"
ReadOnly="True" />
<asp:BoundField DataField="DocumentNumber" HeaderText="Doc. No."
ReadOnly="True" />
<asp:BoundField DataField="Location" HeaderText="Location" ReadOnly="True"
/>
<asp:BoundField DataField="Quantity" HeaderText="Qty" ReadOnly="True" />
<asp:BoundField DataField="QuantityOnOrder" HeaderText="Committed"
ReadOnly="True" />
<asp:BoundField DataField="AmountPerUnit" HeaderText="Cost/Unit"
ReadOnly="True" />
<asp:BoundField DataField="DateAdded" HeaderText="Added" ReadOnly="True" />
<asp:BoundField DataField="DateModified" HeaderText="Modified"
ReadOnly="True" />
</Columns></asp:GridView>
Which I bind like so:
Dim oDS As System.Data.DataSet = Item.GetItemActivity(miItemID, Param1,
Param2)
grdItemActivity.DataSource = oDS '[have also tried: oDS.Tables(0) ]
grdItemActivity.DataBind()
On the DataBind(), I receive the error message "System.Data.DataRowView'
does not contain a property with the name 'ID'." That is correct, the
results don't have a field called "ID", but I'm not referencing any field
called ID in my GridView. WTH? I also tried removing ALL columns and setting
autogeneratecolumns = true, but I still get the same exact error. What am I
missing? TIA.