how to update multiple rows (linq,sql) gridview

  • Thread starter Thread starter johnnybuns
  • Start date Start date
J

johnnybuns

Guest
<div class="row">
<div class="col-md-9">
<asp:Label ID="Label1" runat="server" Text="Order Number"></asp:Label>&nbsp;&nbsp;
<asp:DropDownList ID="OrderDLL" runat="server"
Width="100px" DataSourceID="OrderDLLODS"
DataTextField="OrderID"
DataValueField="OrderID">
</asp:DropDownList>&nbsp;&nbsp;
<asp:Button ID="OrderFetch" runat="server" Text="Fetch" OnClick="OrderFetch_Click" />&nbsp;&nbsp;
<asp:ListView ID="CustomerInfo" runat="server" DataSourceID="CustomerDLLODS">
<ItemTemplate>
<asp:Label ID="Customer" runat="server" Text="Customer: "></asp:Label>&nbsp;&nbsp;
<asp:Label ID="TracksBy" runat="server" Text='<%# Eval("LastName")+", "+Eval("FirstName") %>'></asp:Label>&nbsp;&nbsp;
<asp:Label ID="Contact" runat="server" Text="Contact: "></asp:Label>&nbsp;&nbsp;
<asp:Label ID="SearchArg" runat="server" Text='<%# Eval("Phone") %>'></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;
</ItemTemplate>
</asp:ListView>

<asp:Label ID="Label3" runat="server" Text="Picker"></asp:Label>&nbsp;&nbsp;
<asp:DropDownList ID="PickerDLL" runat="server"
Width="150px" DataSourceID="PickerDLLODS"
DataTextField="DisplayText"
DataValueField="IDValueField"></asp:DropDownList>
</div>
</div>
<asp:GridView ID="OrderList" runat="server" AutoGenerateColumns="False" GridLines="Horizontal" CssClass="table">
<Columns>
<asp:TemplateField HeaderText="Product">
<ItemTemplate>
<asp:Label runat="server" ID="Product" Width="180px" Text='<%# Eval("Product") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Qty">
<ItemTemplate>
<asp:Label runat="server" ID="QtyOrdered" Width="40px"
Text='<%# Eval("QtyOrdered") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Comment">
<ItemTemplate>
<asp:Label ID="CustomerComment" runat="server" Text='<%# Eval("CustomerComment") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Picked">
<ItemTemplate>
<asp:TextBox runat="server" ID="QtyPicked" Width="60px" Text='<%# Bind("QtyPicked") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Pick Issue">
<ItemTemplate>
<asp:TextBox ID="PickIssue" runat="server" Width="100px" Text='<%# Bind("PickIssue") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
No data to view for the Active Order.
</EmptyDataTemplate>
</asp:GridView>
<asp:Button ID="Save" runat="server" Text="Save" Width="200px" OnClick="Save_Click"/>
<asp:ObjectDataSource ID="OrderDLLODS" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="Orders_UnDelivedList"
TypeName="GroceryListSystem.BLL.OrdersController">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="CustomerDLLODS" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="Customer_Get"
TypeName="GroceryListSystem.BLL.OrderListsController">
<SelectParameters>
<asp:ControlParameter ControlID="OrderDLL" PropertyName="SelectedValue" Name="CustomerID" Type="int32"></asp:ControlParameter>
</SelectParameters>
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="PickerDLLODS" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="Pickers_List"
TypeName="GroceryListSystem.BLL.PickersController">
</asp:ObjectDataSource>
</asp:Content>

Continue reading...
 
Back
Top