-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrid.aspx
40 lines (36 loc) · 1.41 KB
/
Grid.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<%@ Page Title="" Language="C#" MasterPageFile="~/main.master" AutoEventWireup="true" CodeFile="Grid.aspx.cs" Inherits="Grid" %>
<asp:Content ID="h" ContentPlaceHolderID="head" runat="server">
<script>
$(document).ready(function () {
var nomePag = location.pathname.substring(location.pathname.lastIndexOf("/") + 1);
PopulaGrid(nomePag, "Get", { 'obj': 0 }, $("#grid"));
// Clique do botão delete do grid
$('body').on('click', '.deleteReg', function () {
if (confirm("Você deseja apagar o registro com ID " + this.id + " ?")) {
Ajax({ 'obj': this.id }, nomePag, $(this), "Apagando...", "Delete");
oTable.fnDeleteRow($(this).attr("itemIndex"));
} else
return false;
});
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="container" runat="Server">
<fieldset>
<legend>Grid</legend>
<table id="grid" class="hidden">
<thead>
<tr>
<th>Id</th>
<th>Nome</th>
<th>Sobre Nome</th>
<th>Endereço</th>
<th>Cep</th>
<th>Ações</th>
</tr>
</thead>
<tbody></tbody>
<tfoot></tfoot>
</table>
</fieldset>
</asp:Content>