Hi Kbatz
As requested, many thanks, the objectdatasource calls the background
routine here:
/// <summary>
/// UPdate product detail
/// </summary>
/// <returns></returns>
public static void UpdateProduct(long PId, string PCostString,
string PDescription, decimal PGross, bool PSpecial, int PStatus, bool
PBillable, string PSupplimentary1) ;
Many thanks
Rich
<asp:GridView ID="GridViewDetail" DataSourceID="ObjectDataSource1"
runat="server" AutoGenerateColumns="False"
DataKeyNames="PId,PSpecial,PBillable,PStatus" PageSize="100"
OnRowDataBound="GridViewDetail_RowDataBound" ShowFooter="True"
OnRowCommand="GridViewDetail_RowCommand"
OnRowUpdating="GridViewDetail_RowUpdating"
CssClass="subcostsfullspan">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Button Text="Edit" CommandName="Edit"
CausesValidation="false" runat="server" ID="btEdit" />
<asp:Button Text="Delete" CommandName="Delete"
CausesValidation="false" runat="server" ID="btDelete" />
</ItemTemplate>
<EditItemTemplate>
<asp:Button Text="Update" CommandName="Update"
CausesValidation="false" runat="server" ID="btUpdate" />
<asp:Button Text="Cancel" CommandName="Cancel"
CausesValidation="false" runat="server" ID="btCancel" />
</EditItemTemplate>
<FooterTemplate>
<asp:Button Text="Insert" CommandName="Insert"
CausesValidation="true" runat="server" ID="btInsert" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Description">
<EditItemTemplate>
<asp:TextBox ID="TextBoxGridDescription"
runat="server" Text='<%# Bind("PDescription") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LabelDescription" runat="server"
Text='<%# Bind("PDescription") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="TextBoxGridDescriptionInsert"
runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cost (£)">
<EditItemTemplate>
<asp:TextBox ID="TextBoxGridGross" runat="server"
Text='<%# Bind("PGross") %>' CssClass="subcostsfullspantxtbox"></
asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LabelGross" runat="server" Text='<
%# Bind("PGross") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="TextBoxGridGrossInsert"
runat="server" CssClass="subcostsfullspantxtbox"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Cost string">
<EditItemTemplate>
<asp:TextBox ID="TextBoxGridCostString"
runat="server" Text='<%# Bind("PCostString") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LabelCostString" runat="server"
Text='<%# Bind("PCostString") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="TextBoxGridCostStringInsert"
runat="server" CssClass="subcostsfullspantxtbox"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Special">
<EditItemTemplate>
<asp:CheckBox ID="CheckBoxGridSpecial"
runat="server" Checked='<%# Bind("PSpecial")%>'></asp:CheckBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LabelSpecial" runat="server" Text='<
%# Bind("PSpecial") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:CheckBox ID="CheckBoxGridSpecialInsert"
runat="server"></asp:CheckBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Billable">
<EditItemTemplate>
<asp:CheckBox ID="CheckBoxGridBillable"
runat="server" Checked='<%# Bind("PBillable")%>'></asp:CheckBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LabelBillable" runat="server"
Text='<%# Bind("PBillable") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:CheckBox ID="CheckBoxGridBillableInsert"
runat="server"></asp:CheckBox>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Status">
<EditItemTemplate>
<asp
ropDownList ID="DropDownListGridStatus"
runat="server">
<asp:ListItem Value="1" Text="For Sale"></
asp:ListItem>
<asp:ListItem Value="2" Text="On Hold"></
asp:ListItem>
<asp:ListItem Value="3" Text="Sold"></
asp:ListItem>
</asp
ropDownList>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LabelStatus" runat="server" Text='<
%# Bind("PStatus") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp
ropDownList
ID="DropDownListGridStatusInsert" runat="server">
<asp:ListItem Value="1" Text="For Sale"></
asp:ListItem>
<asp:ListItem Value="2" Text="On Hold"></
asp:ListItem>
<asp:ListItem Value="3" Text="Sold"></
asp:ListItem>
</asp
ropDownList>
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="# Rooms" Visible="False">
<EditItemTemplate>
<asp:TextBox ID="TextBoxGridSupplimentary1"
runat="server" Text='<%# Bind("PSupplimentary1") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LabelTextBoxGridSupplimentary1"
runat="server" Text='<%# Bind("PSupplimentary1") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="TextBoxGridSupplimentary1Insert"
runat="server" CssClass="subcostsfullspantxtbox"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<table border="0" width="100%" cellspacing="0"
cellpadding="0">
<tr>
<td class="heading">Description:</td>
<td><asp:TextBox
ID="TextBoxGridDescriptionInsertEmpty" runat="server"
CssClass="inpvariants"></asp:TextBox></td>
</tr>
<tr>
<td class="heading">Gross:</td>
<td><asp:TextBox ID="TextBoxGridGrossInsertEmpty"
runat="server" CssClass="inpvariants"></asp:TextBox></td>
</tr>
<tr>
<td class="heading">CostString:</td>
<td><asp:TextBox ID="TextBoxGridCostStringInsertEmpty"
runat="server" CssClass="inpvariants"></asp:TextBox></td>
</tr>
<tr>
<td class="heading">Special:</td>
<td><asp:CheckBox ID="CheckBoxGridSpecialInsertEmpty"
runat="server"></asp:CheckBox></td>
</tr>
<tr>
<td class="heading">Billable:</td>
<td><asp:CheckBox ID="CheckBoxGridBillableInsertEmpty"
runat="server"></asp:CheckBox></td>
</tr>
<tr>
<td class="heading">Status:</td>
<td><asp
ropDownList
ID="DropDownListGridStatusInsertEmpty" runat="server"
CssClass="inpvariants">
<asp:ListItem Value="1" Text="For Sale"></
asp:ListItem>
<asp:ListItem Value="2" Text="On Hold"></
asp:ListItem>
<asp:ListItem Value="3" Text="Sold"></
asp:ListItem>
</asp
ropDownList></td>
</tr>
<tr>
<td class="heading"><asp:Label
ID="LabelSupplimentary1" runat="server" Text="Supplimentary"></
asp:Label>:</td>
<td><asp:TextBox ID="TextBoxGridSupplimentary1Empty"
runat="server" CssClass="inpvariants"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" align="right"><asp:Button ID="btSend"
Text="Insert" runat="server" CommandName="EmptyInsert"
UseSubmitBehavior="False" /></td>
</tr>
</table>
</EmptyDataTemplate>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
SelectMethod="GetProductsByCategory"
TypeName="SurbitonPlaza.LifeStyleSystem.BusinessLayer.Search.ProductManager"
UpdateMethod="UpdateProduct" DeleteMethod="DeleteProduct"
OnDeleting="ObjectDataSource1_Deleting"
OnUpdating="ObjectDataSource1_Updating">
<UpdateParameters>
<asp
arameter Name="PId" Type="Int64" />
<asp
arameter Name="PCostString" Type="String" />
<asp
arameter Name="PDescription" Type="String" />
<asp
arameter Name="PGross" Type="Decimal" />
<asp
arameter Name="PSpecial" Type="Boolean" />
<asp
arameter Name="PStatus" Type="Int32" />
<asp
arameter Name="PBillable" Type="Boolean" />
<asp
arameter Name="PSupplimentary1" Type="String" />
</UpdateParameters>
<DeleteParameters>
<asp
arameter Name="PId" Type="Int64" />
</DeleteParameters>
</asp:ObjectDataSource>