Posts

Showing posts with the label GridView

Print GridView Header On Each Page While On Printing : ASP.NET

Image
This example will show how you can include Table header on each page when you print the html document. You need to have the css, and javascript to do this objective. Let see the full example. The ASPX Page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <style type="text/css" media="print">         .hideOnPrint         {             display: none;         }     </style>     <style type="text/css">         @media print         {             th             {                 color: black;                 background-color: white;             }             THEAD             {                 display: table-header-group;                 border: solid 2px black;             }         }     </style>     <sty

Multiple select button in one gridview

Image
GridView Multiple Select Buttons this is the keyword when i used to searching in Mr. Google and end up with several link to solve this problem. This was my solution to have a multiple select button in one GridView Controller The ASPX Page   <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Vertical" Font-Names="Arial" Font-Size="12px" OnRowCommand="ActionCommand"> <Columns> <asp:BoundField DataField="ID" HeaderText="NO." /> <asp:BoundField DataField="CustomerName" HeaderText="Customer Name" /> <asp:ButtonField CommandName="showName" Text="Show Name" /> <

All About GridView CRUD without 'C' (Read,Update,Delete) function ASP.Net

Image
Gridview is a powerful tools for developer to view the records from database, for example like user manager page. Today i want to show how to delete, and modify in gridview plus to have a user friendly viewing functionality about the a Total records that user want to show on GridView and total records of all data. Lets Try.. The ASP.NET Page  <asp:Label ID="LErrorMessage" ForeColor="Red" runat="server"></asp:Label>     <br />     <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="mainTable"         BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px"         AllowPaging="True" PageSize="15"         Width="864px" EmptyDataText="Tiada Rekod Dijumpai" OnRowDeleting="GridView1_RowDeleting"         OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDataBound="addJavascr