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
Grid As Subgrid +Custom Button
29/09/2011
11:26
Avatar
p2pow350
Member
Members
Forum Posts: 32
Member Since:
26/05/2011
sp_UserOfflineSmall Offline

Hi,

starting from the working example listed in the Jqgrid Demos Advanced->Grid as Subgrid and actually copied it for this test, how to add a custom button?

It's hours I'm trying with different combinations but I'm not able to place a custom button in the Top Pager.

I can succesfully add a custom botton in the main grid, but I'm not able to reference the Top Pager for the Subgrid.

How to refer to inside grid correctly?

I'm using really as code base the Example in the Grid 

Thanks

My code (last attempts copy&paste....there are many attempts):

//remove pager button from TOP (WORKING)

var topPagerDiv = $('#' + subgrid_table_id + '_toppager')[0];

$("#" + subgrid_table_id + "_toppager_center", topPagerDiv).remove();

$(".ui-paging-info", topPagerDiv).remove();

//NOT WORKING

$('#' + subgrid_table_id).jqGrid('navButtonAdd', topPagerDiv + '_left', {

caption: "Print Grid",

buttonicon: 'ui-icon-print',

position:"last",

onClickButton: function() {

print_grid();

}

});

29/09/2011
11:38
Avatar
p2pow350
Member
Members
Forum Posts: 32
Member Since:
26/05/2011
sp_UserOfflineSmall Offline

In the example I can see the following code:

jQuery("#"+subgrid_table_id).jqGrid('navGrid',"#"+pager_id,{edit:false,add:false,del:false})

If I try to enable any feature like Add (add:true) there is no difference in the Top pager...so even the example is not referring correctly to the topbar, please how this can be done clearly?

Thanks

03/10/2011
20:38
Avatar
p2pow350
Member
Members
Forum Posts: 32
Member Since:
26/05/2011
sp_UserOfflineSmall Offline

Please, someone take the example Advanced->Grid as Subgrid and try a simple copy&paste.

In the example page I can see the following code:

jQuery("#"+subgrid_table_id).jqGrid('navGrid',"#"+pager_id,{edit:false,add:false,del:false})

If I need to enable the Add button to the Bar I expect to write:

jQuery("#"+subgrid_table_id).jqGrid('navGrid',"#"+pager_id,{edit:false,add:true,del:false})

But if you try yourself you will find that it doesn't work...

My question is: how to work on the top bar for a subgrid?

Thanks

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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