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
How to set up toolbar with gridimport?
17/05/2010
10:42
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

Hi,

I'm having bit of a problem with jqGridImport and toolbar. I'm setting up toolbar in loadComplete -event, but it won't show up or initialize at all. No error messages are shown either. I'm using version 3.6.5, but I've had this same problem with earlier versions as well.

Here's my import call:

$("#ArchivedInvoices").jqGridImport({
            imptype: "json"
            , impurl: '<%=System.Web.VirtualPathUtility.ToAbsolute("~/")%>Services/Invoice/ArchivedInvoiceService.svc/GetArchivedInvoiceGrid'            
            , jsonGrid: {
                config: "grid",
                data: "data"
            }
            , importComplete: function() {
            
                $("#ArchivedInvoices").setGridParam({
                    loadonce: true,
                    toolbar: [true,"bottom"]
                });
                $("#ArchivedInvoices").setGridParam('pager',$("#ArchivedInvoicesPager"));
                $("#ArchivedInvoices").jqGrid('navGrid', '#ArchivedInvoicesPager', {
                    add: false,
                    edit: false,
                    del: false,
                    search: true,
                    refresh: true
                },{}, {}, {}, { multipleSearch: true });
                $("#ArchivedInvoices").setGridParam('searchGrid', { loadDefaults: true });                
                $("#ArchivedInvoices").jqGrid('navGrid', '#ArchivedInvoicesToolbar', { edit: false, add: false, del: false });
            } // import complete ends
        }); // grid import ends.

Grid and toolbar are also defined as HTML table and div:

    <table id="ArchivedInvoices" class="scroll" cellpadding="0" cellspacing="0" style="width:100%"></table>     
    <div id="ArchivedInvoicesPager" class="scroll"></div>
    <div id="ArchivedInvoicesToolbar" class="scroll"></div>

What's wrong with this?

Regards,

roto

20/05/2010
10:17
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

If gridImport is not defined, I can see toolbar. I also tried setting toolbar in loadComplete -event with

$("#ArchivedInvoices").setGridParam("toolbar",[true,'bottom']);

But that didn't help either.

Any clues?

20/05/2010
15:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

This is not possible as weel. This property can not be created/disabled automatically.

In order to understand what you can do with some properties look here:

http://www.trirand.com/jqgridw.....ki:options

The last column into the table tell you which properties can be changed dynamically

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

20/05/2010
22:56
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

Hi Tony,

Can you tell if it's possible to use toolbar with gridimport? I can keep looking for an solution for this if it is possible somehow. I tried defining it in WCF service, but guess the problem is that it is formatted as string so grid cannot use it to create toolbar.

Regards,

Roto

24/05/2010
18:38
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Simple enable it in the json/xml import string.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

24/05/2010
20:45
Avatar
rotoflex
Member
Members
Forum Posts: 16
Member Since:
21/01/2010
sp_UserOfflineSmall Offline

Hi Tony,

I have enabled it, this is part of WCF wrapper class which returns grid configuration:

grid.Configuration.Toolbar = "[true,'bottom']";

Could it be that because I'm returning a string, grid cannot initialize toolbar?

Regards,

roto

30/05/2010
13:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The simple test on this is. Create a grid with option like you provide. Then use export as jsonstring and see how this is exported.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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