powered by simpleCommunicator - 2.0.59     © 2025 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / jqgrid модальное окно
4 сообщений из 4, страница 1 из 1
jqgrid модальное окно
    #39269859
Part.k
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
День добрый всем, начал изучать jqgrid и столкнулся с проблемой.
Все подключил, данные достаются отлично, но при выделении строки и нажатию на кнопку добавить/редактировать открывается пустое модальное окно. примеры уже все перебрал не получается, уже не знаю в чем дело.

Код: html
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.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>My First Grid</title>
                <link rel="stylesheet" type="text/css" href="/css/custom/jquery-ui.css" />
                <link rel="stylesheet" type="text/css"  href="/css/ui.jqgrid.css" />
<style type="text/css">
html, body {
margin: 0;
padding: 0;
font-size: 75%;
}
</style>
<script src="/js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script src="/js/i18n/grid.locale-ru.js" type="text/javascript"></script>
<script src="/js/jquery.jqGrid.min.js" type="text/javascript"></script>
<script type="text/javascript">

$(function () {
            
$("#list").jqGrid({
url: "/RL/example2.php",
datatype: "json",
mtype: "GET",
colNames: ["Inv No", "Date", "Amount", "Tax", "Total", "Notes"],
colModel: [
{ name: "idobyekt", width: 55, stype: 'texr', key:true},
{ name: "obyekt", width: 300, edittable:true },
{ name: "adres", width: 80, align: "right" , edittable:true, eddittype: 'text', sortable: true},
{ name: "telefon", width: 80, align: "right", edittable:true, eddittype: 'text', sortable: true },
{ name: "tockapodkl", width: 80, align: "right" , edittable:true, eddittype: 'text', sortable: true},
{ name: "klvl", width: 150, sortable: false , edittable:true, eddittype: 'text', sortable: true}
],
pager: "#pager",
rowNum: 20,
rowList: [20, 40, 60],
sortname: "idobyekt",
sortorder: "desc",
viewrecords: true,
gridview: true,
autoencode: true,
width: 1500,
height: 500,
caption: "Объекты",
subGrid: true,
subGridRowExpanded : showChildGrid
});

 
function showChildGrid(parentRowID, parentRowKey){
                var childGridID = parentRowID +"_table";
                var childGridPagerID = parentRowID +"_pager";
                var childGridURL = "/RL/objectcounter.php";         
            $('#'+ parentRowID).append('<table id='+ childGridID +'></table><div id='+ childGridPagerID +' class=scroll></div>');
            $("#"+ childGridID).jqGrid({              
                url: childGridURL+ '?id='+ parentRowKey,
                mtype:"GET",
                datatype:"json",
                page:1,
                colModel:[
                { label:'idcounter', name:'idcounter', key:true, width:75},
                { label:'nomercounter', name:'nomercounter', width:100},
                { label:'tipcounter', name:'tipcounter', width:100},
                { label:'ktt', name:'ktt', width:100}],
                                                               loadonce:true,
                width:500,
                height:'100%',
                pager:"#"+ childGridPagerID
            });}

 
$('#list').jqGrid('navGrid','#pager',
        { edit:true,
add:true,
del:true,
search:false,
refresh:false,
view:false,
position:"left",
cloneToTop:false}
);

});

</script>
</head>

<body>

<table id="list" ><tr><td></td></tr></table>

<div id="pager"></div>

</body>
</html>
...
Рейтинг: 0 / 0
jqgrid модальное окно
    #39270245
Part.k
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
вот тут рабочий вариант как ни странно.
заменил в примере на свои параметры заработало.
http://trirand.com/blog/jqgrid/jqgrid.html
...
Рейтинг: 0 / 0
jqgrid модальное окно
    #39270246
Part.k
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
Part.kвот тут рабочий вариант как ни странно.
заменил в примере на свои параметры заработало.
http://trirand.com/blog/jqgrid/jqgrid.html
забыл добавить слева выбираем: Live Data Manipulation
...
Рейтинг: 0 / 0
jqgrid модальное окно
    #39288612
Nebo
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Part.kвот тут рабочий вариант как ни странно.
заменил в примере на свои параметры заработало.
http://trirand.com/blog/jqgrid/jqgrid.html

Он платный или бесплатный?
...
Рейтинг: 0 / 0
4 сообщений из 4, страница 1 из 1
Форумы / HTML, JavaScript, VBScript, CSS [игнор отключен] [закрыт для гостей] / jqgrid модальное окно
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]