Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
jqGrid insert jquery ui dialog?
31/08/2013
08:23
Avatar
Waldo
New Member
Members
Forum Posts: 1
Member Since:
31/08/2013
sp_UserOfflineSmall Offline

Can someone give some guidance on using a jqGrid inside a jQuery dialog?  I've got the grid loading when the dialog is first opened, but have the following problems:

It's not possible to type in the grid add row and edit row dialogs.  The delete dialog, which requires only mouse clicks (no typing) works fine.

The grid loads the first time the dialog is opened, but after that, the dialog opens empty.

I'm new to both jQuery and jqGrid so I could be missing something obvious.  I greatly appreciate your help!

Here's my html:

<img id="btnNotes" alt="" src="images/Button_notes.gif" />

<div id="DialogDiv">

<table id="AppNoteList" ></table>

<div id="tabPagerBar" ></div> 

</div>        

The jQuery is:

var dlg;

$(document).on("click", "#btnNotes", function () {

dlg = $('#DialogDiv').dialog({

autoOpen: false, draggable: true, closeOnEscape: false, resizable: true, position: "center",

dialogClass: 'DynamicDialogStyle',

modal: true,

open: function () {

$("#AppNoteList").jqGrid({

datatype: function (pdata) {

AjaxGetAppNotes(); // JSON call; this is working fine and grid loads correctly.

},

colName: ['AppNotesId', 'DateStamp', 'Note'],

colModel: [

{ name: 'AppNotesId', key: true },

{ name: 'DateStamp' },

{ name: 'Note', width: 400, editable: true, edittype: 'textarea', editoptions: { rows: "5", cols: "60"} }

],

rowNum: 10,

rowList: [10, 20, 30],

pager: '#tabPagerBar',

sortname: 'DateStamp',

viewrecords: true,

sortorder: "desc",

caption: "Applicant Notes"

});

$("#AppNoteList").jqGrid('navGrid', '#tabPagerBar', { reloadAfterSubmit: true, edit: true, add: true, del: true },

//edit options

{url: 'DataAccess.asmx/updateAppNotes', closeAfterEdit: true, editData: { "AppId": "2319957"} }, // AppId hardcoded for example

//add options

{url: 'DataAccess.asmx/updateAppNotes', closeAfterAdd: true, editData: { "AppId": "2319957"} }, // AppId hardcoded for example

//delete options

{url: 'DataAccess.asmx/delAppNote' }

);

},

close: function (e) {

$(this).empty();

$(this).dialog('destroy');

},

height: 350,

width: 800,

title: 'App Notes'

});

dlg.dialog("open");

});

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information