v2.6, C# 3.5 with Sql 2008
I can't get gridview updates and deletes to work. Paging and sorting work flawlessly, but no luck with updates and deletes. I have checked the obvious pitfalls and still can't track down the problem (datakeynames is specified with primary key).
WHAT AM I MISSING HERE? The simplest of examples provided. Any ideas would be appreciated.
<asp:GridView ID="gvItems" runat="server"
AllowPaging="true"
AllowSorting="true"
DataKeyNames="itemid"
DataSourceID="dsItems"
PagerSettings-Mode="NumericFirstLast"
PagerSettings-Position="Bottom"
PagerStyle-CssClass="gridViewPager"
PageSize="75" AutoGenerateEditButton="true" AutoGenerateDeleteButton="true">
<Columns>
<asp:BoundField SortExpression="itemid" HeaderText="Item ID " DataField="itemid" Visible="false" ReadOnly="true" />
<asp:BoundField SortExpression="itemname" HeaderText="Item Name " DataField="itemname" />
<asp:BoundField SortExpression="itemcode" HeaderText="Item Code " DataField="itemcode" />
<asp:BoundField SortExpression="itemdesc" HeaderText="Item Description " DataField="itemdesc" />
<asp:BoundField SortExpression="qtystart" HeaderText="Starting Qty " DataField="qtystart" />
<asp:BoundField SortExpression="qty" HeaderText="Qty On Hand " DataField="qty" />
<asp:BoundField SortExpression="qtyalert" HeaderText="Low Status Qty " DataField="qtyalert" />
</Columns>
<EmptyDataTemplate>
No Items Found...
</EmptyDataTemplate>
</asp:CustomGridView>
<llblgenpro:LLBLGenProDataSource ID="dsItems" runat="server" EnablePaging="true" SortingMode="ClientSide" CacheLocation="Session" EntityCollectionTypeName="GreenMonkey.Core.CollectionClasses.ItemCollection, GreenMonkey.Core" DataContainerType="EntityCollection" LivePersistence="true"> </llblgenpro:LLBLGenProDataSource>