<asp:UpdatePanel ID="pnlUpdate" runat="server"> <contenttemplate> <asp:GridView Width="100%" AllowPaging="True" ID="gvCustomers" AutoGenerateColumns="False" DataSourceID="sqlDsCustomers" runat="server" ShowHeader="False" OnRowCreated="gvCustomers_RowCreated"> <columns> <asp:TemplateField> <itemtemplate> <div class="group" id="<%#String.Format("customer{0}",Container.DataItemIndex) %>" önclick="showhide(<%#String.Format("\"#customer{0}\"",Container.DataItemIndex) %>,<%#String.Format("\"#order{0}\"",Container.DataItemIndex) %>)"> <asp:Image ID="imgCollapsible" CssClass="first" ImageUrl="~/Assets/img/plus.png" Style="margin-right: 5px;" runat="server" /> <%#Eval("CustomerID")%> : <%#Eval("CompanyName")%> (<%#Eval("TotalOrders")%> Orders) </div> <asp:SqlDataSource ID="sqlDsOrders" runat="server" ConnectionString="<%$ ConnectionStrings:Northwind %>" SelectCommand="SELECT [OrderID], [OrderDate], [RequiredDate], [Freight], [ShippedDate] FROM [Orders] WHERE ([CustomerID] = @CustomerID)"> <SelectParameters> <asp:Parameter Name="CustomerID" Type="String" DefaultValue="" /> </SelectParameters> <div id="<%#String.Format("order{0}",Container.DataItemIndex) %>" class="order"> <asp:GridView AutoGenerateColumns="false" CssClass="grid" ID="gvOrders" DataSourceID="sqlDsOrders" runat="server" ShowHeader="true" EnableViewState="false"> <rowstyle cssclass="row" /> <alternatingrowstyle cssclass="altrow" /> <columns> <asp:TemplateField ItemStyle-CssClass="rownum"> <itemtemplate> <%# Container.DataItemIndex + 1 %> </itemtemplate> <asp:BoundField HeaderText="Order ID" DataField="OrderID" ItemStyle-Width="80px" /> <asp:BoundField HeaderText="Date Ordered" DataField="OrderDate" DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Width="100px" /> <asp:BoundField HeaderText="Date Required" DataField="RequiredDate" DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Width="110px" /> <asp:BoundField HeaderText="Freight" DataField="Freight" DataFormatString="{0:c}" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField HeaderText="Date Shipped" DataField="ShippedDate" DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Width="100px" /> <asp:TemplateField> <itemtemplate> <asp:Button ID="btnLock" Text="Lock" CommandName="Lock" CommandArgument=<%# Eval("OrderID") %> runat="server" /> </itemtemplate> </columns> </div> </itemtemplate> </columns> </contenttemplate>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)