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
gridComplete don't fire after sorting
16/12/2009
10:05
Avatar
Ismo
Guest
Guests

I have gridComplete to put:

$("#sole_grid_table").jqGrid('setSelection',id,false);

to wanted rows after loading. It works fine.

but when I do sorting, grid removes selected rows and  gridComplete don't fire.

onSortCol fires, but it fires before sorting, so it's too early.

am I doing something wrong? or is there an bug?

http://www.trirand.com/jqgridw.....  : "gridComplete  ...  This fires after ... and after sorting paging and etc."

17/12/2009
15:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. Could you please post the entry grid configuration?

If you put alert in gridComplete -  what is happen?

Is your sorting loacal or server side?

Also we need the entrygrid configuration and other code related to it

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.

29/12/2009
00:44
Avatar
shah
Guest
Guests

Hi Tony,

First of all congratulations on this fantastic grid.

I am having similar problem. can you tell me if i am doing something wrong Confused i am using java spring/jsp? Also i want to get rid of all the pagenation stuff from this grid and dumpo all the records on to the page, i can do that but not able to get rid of the page 1 of 1 and the buttons associated.

-====-

jQuery(document).ready(function(){

    var mystr = <%=request.getAttribute("myjsonstr")%>;

    jQuery("#mygrd").jqGrid({
        url:'loadProductSummary.do',    
        datatype: "jsonstring",
        datastr: mystr,
        colNames:['Rate ID','Region', 'Comment', 'Update By', 'Update Time'],
        colModel:[ {name:'Rate ID',index:'Rate ID', width:80, sorttype:'int', editable:true, editoptions:{size:10}},
            {name:'Region',index:'Region', width:80, editable:true, edittype:"select", editoptions:{value:nameSelect(),size:10}},
            {name:'comment',index:'comment', width:250, editable:true, editoptions:{size:10}},
            {name:'update_by',index:'update_by', width:100, sorttype:'float', editable:true, editoptions:{size:10}},
            {name:'update_time',index:'update_time', width:100, sorttype:'date', editable:false, editoptions:{size:10}}
        ],
        rowNum: 1000,
        pager: '#pagernav',
        sortname: 'Rate ID',
        viewrecords: true,
        sortorder: "asc",
        shrinkToFit: false,
        width: 1024,
        height: 450,
        caption:"Rates View",
        editurl: "jsonServlet?action=edit",
        onSortCol: function()    {
            alert('In the onSortCol');
            jQuery("#ratematrix").setGridParam({datatype:'local'});
        },
        loadComplete: function () {
            alert('In the loadComplete');
            jQuery("#ratematrix").setGridParam({datatype:'json'});
        },
        gridComplete: function () {
            alert('In the gridComplete');
            jQuery("#ratematrix").setGridParam({datatype:'json'});
        },
        jsonReader : { root: "rows", page: "page", total: "total", records: "records", repeatitems: false, cell: "rows", id: "id"} 
      });

    jQuery("#mygrd").jqGrid('navGrid','#pagernav',
        {view:false, refresh:true, search:false}, //options
        {checkOnSubmit : true, reloadAfterSubmit:false, closeOnEscape:true, bottominfo:"Fields marked with (*) are required",
            afterShowForm: function(eparams) {
                document.getElementById('Rate ID').disabled = true;
            }
        }, // edit options
        {checkOnUpdate:true,checkOnSubmit : true, reloadAfterSubmit:true, closeOnEscape:true,bottominfo:"Fields marked with (*) are required",
            afterShowForm: function(eparams) {
                document.getElementById('Rate ID').disabled = true;
            }
        }, // add options
        {reloadAfterSubmit:false,closeOnEscape:true}, // del options
        {closeOnEscape:true}, // search options
        {navkeys: [true,38,40], height:250,jqModal:false,closeOnEscape:true} // view options

    );

});

</script>

    <table id="mygrd" class="scroll"></table>
    <div id="pagernav" class="scroll" style="text-align: center;"></div>

Best

- Shah

29/12/2009
16:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Look here:

http://www.trirand.com/jqgridw.....ide_paging

Best Regards

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.

29/12/2009
21:21
Avatar
shah
Guest
Guests

Thanks Tony,

my initial setting is datatype: "jsonstring"

I want local sort, however when i press refresh it should be json. the refresh works fine as long as i do not sort the grid. once i sort, the datatype is set to local and the sort works locally taht is what i want. but once the sort is done the locaComplete or gridcomplete does not fire. how do i change the datatype back to json for refresh?

        onSortCol: function()    {
//            alert('In Sort');
            jQuery("#ratematrix").setGridParam({datatype:'local'});
        },
        loadComplete: function () {
//            alert('load Complete');
            jQuery("#ratematrix").setGridParam({datatype:'json'});
        },
        gridComplete: function () {
//            alert('gridComplete');
            jQuery("#ratematrix").setGridParam({datatype:'json'});
        },

03/01/2010
13:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. Also I have fixed this - will publish the fix tomorrow in GitHub

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.

03/01/2010
14:37
Avatar
shah
Member
Members
Forum Posts: 26
Member Since:
30/12/2009
sp_UserOfflineSmall Offline

Thanks a lot Tony.

i am not to familiar with your bug releases, how would i patch the exisitng js? is there a min version ?

Thanks again,

Amar

05/01/2010
18:34
Avatar
shah
Member
Members
Forum Posts: 26
Member Since:
30/12/2009
sp_UserOfflineSmall Offline

nevermind got everything and then ran the ant build

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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