<asp:GridView ID="grdOrderDetails" runat="server" OnRowCommand="grdOrderDetails_RowCommand" OnRowDataBound="grdOrderDetails_RowDataBound" OnPageIndexChanging="grdOrderDetails_PageIndexChanging" AllowPaging="true" AutoGenerateColumns="false" DataKeyNames="OrderId"> <columns> <asp:TemplateField HeaderText="OrderID" Visible="false"> <itemtemplate> <asp:Label ID="lblOrderId" runat="server" Text='<%# Eval("OrderId") %>'> </itemtemplate> <asp:TemplateField HeaderText="Sr No."> <itemtemplate> <asp:Label ID="lblSrNo" runat="server"><%# Container.DataItemIndex + 1 %> </itemtemplate> <asp:BoundField DataField="ClientName" HeaderText="Client Name" /> <asp:BoundField DataField="LocName" HeaderText="Location Name" /> <asp:BoundField DataField="AddressName" HeaderText="Address Name" /> <asp:TemplateField HeaderText="Dispatch Order"> <itemtemplate> <asp:LinkButton ID="lnkDispatch" runat="server" Text="Dispatch" CommandName="Dispatch" CommandArgument='<%#Eval("OrderId") %>' OnClick="lnkDispatch_Click" > </itemtemplate> <asp:TemplateField HeaderText="Cancel Order"> <itemtemplate> <asp:LinkButton ID="btnCancel" runat="server" Text="Cancel" OnClientClick="return confirm('Are you sure you want to cancel this order?')" CommandName="cDelete" CommandArgument='<%#Eval("OrderId") %>'> </itemtemplate> <asp:TemplateField> <itemtemplate> <tr id="tr" runat="server" visible="false"> <td id="td1" runat="server" > <td id="td2" colspan="999" runat="server"> <asp:GridView ID="grdDispatch" runat="server" AutoGenerateColumns="false" AllowPaging="true" Width="100%" OnRowDataBound="grdDispatch_RowDataBound" OnRowCommand="grdDispatch_RowCommand"> <columns> <asp:TemplateField HeaderText="Order Id" Visible="false"> <itemtemplate> <asp:Label ID="OrderId" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "OrderId") %>'> </itemtemplate> <asp:TemplateField HeaderText="Delivery Type"> <itemtemplate> <asp:DropDownList ID="ddlDeliveryType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlDeliveryType_SelectedIndexChanged"> <asp:ListItem Text="--Select--" Value="0"> <asp:ListItem Text="Hand Delivery" Value="1"> <asp:ListItem Text="Courier" Value="2"> </itemtemplate> <asp:TemplateField HeaderText="Courier Name" Visible="true"> <itemtemplate> <asp:DropDownList ID="ddlCourier" runat="server"> </itemtemplate> <asp:TemplateField HeaderText="Courier Receipt No." Visible="true"> <itemtemplate> <asp:TextBox ID="txtCourierNo" runat="server"> </itemtemplate> <asp:TemplateField HeaderText="Dipatch"> <itemtemplate> <asp:Button ID="btnUpdate" runat="server" Text="Dispatch" CommandName="cUpdate" CommandArgument='<%#((GridViewRow)Container).RowIndex%>' /> </itemtemplate> <asp:TemplateField HeaderText="Cancel"> <itemtemplate> <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancelUpt_Click" /> </itemtemplate> </columns> </itemtemplate> </columns>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)