Forum


12:55

01/04/2010

Hi,
I finally managed to view a record of my grid using a custom dialog.
This is what I do:
--------------------------------------------------------------------------------------------------------------------------------------------
var ret = jQuery("#griglia-negozi").jqGrid('getRowData', idbut);
var $dialog = $('<div></div>')
// Testo della finestra
.html('<form name="order" id="order" > '+
' <fieldset> '+
' <legend>Invoice Data</legend> '+
' <table> '+
' <tbody> '+
' <tr> '+
' <td> Nome Negozio:</td> '+
' <td><input type="text" name="nomenegozio" readonly=true id="nomenegozio"/></td> '+
' </tr> '+
' <tr> '+
' <td> Telefono:</td> '+
' <td><input type="text" name="telefono" readonly=true id="telefono"/></td> '+
' </tr> '+
' </tbody> '+
' </table> '+
' </fieldset> '+
'</form> '
)
// Imposto le proprietà della finestra
.dialog({
autoOpen: false,
modal: true,
resizable: 'false',
closeOnEscape: 'true',
width:500,
show:{ effect:"puff",
options:{direction:"right"},
speed:1000 },
hide:{ effect:"drop",
options:{direction:"right"},
speed:1000 },
height:350,
title: 'Visualizzazione Locale',
buttons: { "Chiudi": function() {
$(this).dialog("close");
}
}
});
jQuery("#griglia-negozi").jqGrid('GridToForm', ret.idnegozio,"#order");
// Apro la finestra
$dialog.dialog('open');
--------------------------------------------------------------------------------------------------------------------------------------------
what I don't understand is why the first time it's working, the second time the form is not linked to the grid (i see the dialog but all the fields are empty)..
please help me..
Most Users Ever Online: 715
Currently Online:
52 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66