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_Related Related Topics sp_TopicIcon
website menu not regenerating grid with new data (click on second menu item)
27/04/2010
00:08
Avatar
Energetic Pixels
Lexington, OK, USA
Member
Members
Forum Posts: 40
Member Since:
12/04/2010
sp_UserOfflineSmall Offline

I have a menu that works as advertised but only when you only click one menu.  The original rendered grid remains displayed when a subsequent menu item is clicked.  No new data.  Menu items are generating jqGrid with data.  Only menu items that are programmed so far is Small Arms > Shotgun and Bullet and then Chemical.

My website is here for a better look.  I found in the documentation of jqGrid "GridDestroy", but I am a little dumb-founded on how to use it.  Can anyone shed a little more light to this newbie??

here is a sample of my grid code:

       

$('#bullet').click(function() {

$('#searchResults').jgrid.GridDestroy;                         // LINE IN QUESTION
        $('#searchResults').jqGrid({
            url: 'weaponLib/AME_sa-bullet.xml',
            datatype: 'xml',
            colNames:["DODIC","NSN", "Size/Caliber", "Nomenclature"],
            colModel:[
                {name:"dodic",index:"dodic", xmlmap:"DODIC", width:30, align:"center", sorttype:"float"},
                {name:"NSN",index:"NSN", xmlmap:"transData>NSN", width:40, align:"center"},
                {name:"size", index:"size", xmlmap:"size",width:30, align:"center"},
                {name:"nomenclature",index:"nomenclature", xmlmap:"nomenclature", width:120, align:"left"}
                ],
            height:250,
            width: 900,
            viewrecords: true,
            xmlReader: {
                root : "smallArms",
                row: "bullet",
                repeatitems: false,
                id: "[saId]"
                },
            rowNum: -1,
            scroll: true,
            altRows: true,
            pager: 'gridNavBar',
            caption: "Bullet Results"
        });
        $('#welcome').css('display', 'none');
        $('#theGrid').css('display', 'block');
    });

27/04/2010
13:47
Avatar
Energetic Pixels
Lexington, OK, USA
Member
Members
Forum Posts: 40
Member Since:
12/04/2010
sp_UserOfflineSmall Offline

Never Mind.  Found it in the "wee" hours of the morning.  I was reading documentation wrong.  GridDestroy kills my <table> and <div> (for pager) whereas GridUnload keeps the <table> and <div> intact for reuse.

TonySmile

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
26 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