<asp:GridView ID="gvGRNListAll" runat="server" AutoGenerateColumns="False" Style="width: 100%;" AllowPaging="True" PageSize="15" OnPageIndexChanging="gvGRNListAll_PageIndexChanging" CellPadding="4" ForeColor="#333333" BorderColor="#CCCCCC" ShowHeaderWhenEmpty="True" GridLines="None"> <AlternatingRowStyle BackColor="White" /> <PagerStyle CssClass="pager" /> <Columns> <asp:TemplateField HeaderText="S.No"> <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%#Container.DataItemIndex+1 %>'></asp:Label> </ItemTemplate> <ItemStyle HorizontalAlign="Left" Width="10%" /> </asp:TemplateField> <asp:BoundField DataField="LocationName" HeaderText="Location" /> <asp:BoundField DataField="SupplierName" HeaderText="Supplier Name" /> <asp:BoundField DataField="GRNNo" HeaderText="GRN No" /> <asp:BoundField DataField="InvoiceNo" HeaderText="In.No"> <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" /> </asp:BoundField> <asp:BoundField DataField="GRNDate" HeaderText="GRNDate" /> <asp:TemplateField HeaderText="Action" SortExpression="ExId" ControlStyle-ForeColor="Blue"> <ItemTemplate> <asp:HiddenField ID="hdnStoreCode" runat="server" Value='<%# Eval("StoreCode") %>' /> <asp:HiddenField ID="hdnGRNNo" runat="server" Value='<%# Eval("GRNNo") %>' /> <asp:LinkButton ID="lbView" OnClick="lbView_Click" runat="server" Text="View"></asp:LinkButton> </ItemTemplate> <ControlStyle ForeColor="#FF3300" /> <HeaderStyle CssClass="GridHeaderROW" Width="10%" /> <ItemStyle CssClass="GridItemROW" Width="10%" /> </asp:TemplateField> </Columns> <EmptyDataRowStyle HorizontalAlign="Center" VerticalAlign="Bottom" ForeColor="#FF3300" /> <EmptyDataTemplate> No Records Found. </EmptyDataTemplate> <EditRowStyle BackColor="#2461BF" /> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Left" /> <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#EFF3FB" /> <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#F5F7FB" /> <SortedAscendingHeaderStyle BackColor="#6D95E1" /> <SortedDescendingCellStyle BackColor="#E9EBEF" /> <SortedDescendingHeaderStyle BackColor="#4870BE" /> </asp:GridView>
if (sender is LinkButton) { GridViewRow gvrCurrent = ((LinkButton)sender).NamingContainer as GridViewRow; hdnGRNNo = (HiddenField)gvrCurrent.FindControl("hdnGRNNo"); hdnStore = (HiddenField)gvrCurrent.FindControl("hdnStoreCode"); gvGRNListAll.Rows[gvrCurrent.RowIndex].BackColor = System.Drawing.Color.Empty; gvGRNListAll.Rows[gvrCurrent.RowIndex].BackColor = System.Drawing.ColorTranslator.FromHtml("#D8D8D8"); if (hdnGRNNo != null && hdnStore != null) { GetGRNListForNo(hdnGRNNo.Value, Convert.ToInt32(hdnStore.Value)); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)