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
Cell Edit Bugs
27/03/2009
19:44
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Hello Tony,

First of all I want to say thank you for this excellent grid. I have some problems with cell edit and I need your help.

1) When someone press an editable cell and then press to sort something when he returns to the cell, the html tag then appears

<input name=”amount” id=”2_amount” style=”width: 98%;” type=”text”>

2) When a user has select a editable cell and delete the row then the grid is not “responding”. Well you can add new rows, but you can not see the indicator of what row you have select or edit any cells. Something like “half froze”!

According to 1 I know that has been mentioned by an other user but there was no answer. Also i found this

http://www.trirand.com/blog/?p.....ing/page-1

He can not sort when he is in edit mode. Furthermore i tried with beforeEditCell to disable the sortable but with no luck.

My jgrid conf is something like that

jQuery(document).ready(function(){
    var lastSel;
jQuery(”#list2″).jqGrid({
    url:'include/jgrid.php?nd='+new Date().getTime(),
    datatype: “json”,

    colNames:['ID','Κωδ.','Περιγραφή', 'Τεμ/Κιβ.', 'ΠοσÏŒτητα'],
    colModel:[
    {name:'id',index:'id', width:10, sortable: true, sorttype:"int", hidden:true, editrules:{edithidden:true} },
        {name:'code', sortable: true, width:10, sorttype:"text" },
        {name:'desc',index:'description', width:100, sortable: true, editable:false, sorttype:"text" },
    {name:'item',index:'item', width:12, sortable: true, editable:false, sorttype:"text" },
        {name:'amount',index:'amount', sortable: true, editable:true, width:15, sorttype:"int", formatter:'integer', editrules:{required: true, integer: true, minValue: 1} }    //formatter:'checkbox',editoptions:{value:“true:false”}
    ],

    pager: jQuery('#pager2'),

    rowNum:10,

    rowList:[10,20,30],

    imgpath: '../admin/js/jgrid/themes/basic/images',
    sortname: 'sequence',

    viewrecords: true,
    cellEdit: true,
    cellurl: “include/jgrid_update.php”,
    cellsubmit: “clientArray”,
    sortorder: “asc”,
    caption: “ΠροÏŠÏŒντα”,
    width: 825,
    height: 250,
    loadonce: true,
    editurl:”include/jgrid_update.php”,
    pager: jQuery('#pager2'),
    onSelectRow: function(id){
    if(id && id!==lastSel){
        jQuery('#list2').restoreRow(lastSel);       
        lastSel=id;
    }   

    jQuery('#list2').editRow(id, true );

    },
    onRightClickRow: function(id){
    alert(”Δεν επιτρέπεται το δεξί κλικ!”);
    return false;
    },
    afterSaveCell: function(id){
    $('#list2 td.dirty-cell').removeClass(”dirty-cell edit-cell”);
    $('#list2 tr.edited').removeClass(”edited”);
    },
    afterEditCell: function(id){
    //alert(”test 2″);
   
    },
    beforeEditCell: function(id){
    //alert(”test 345″);
    jQuery(”#list2″).setColProp('amount',{sortable: true});
    }
});

jQuery(”#list2″).navGrid('#pager2',
    {refresh: false, edit: false, add: false, del: false, search: false},
    {height:280,reloadAfterSubmit:false}, // edit options
    {height:280,reloadAfterSubmit:false}, // add options
    {reloadAfterSubmit:false}, //delete options
    {reloadAfterSubmit:false}

).navButtonAdd('#pager2',{
        caption:”Delete”, buttonimg:”../admin/js/jgrid/themes/steel/images/row_delete.gif”, onClickButton: function delRow(){
            var id = jQuery(”#list2″).getGridParam('selrow');
            var su=jQuery(”#list2″).delRowData(id);           
            if (!su){
                alert (”You don't have choose any products!”);
            }
        }
}).navButtonAdd('#pager2',{
        caption:”Clear All”, buttonimg:”../admin/js/jgrid/themes/steel/images/tab_close-on.gif”, onClickButton: function clearAll(){
            var su=jQuery(”#list2″).clearGridData();
        }

});

Am I doing something wrong?

Regards,

Dimitris Mexis

30/03/2009
02:45
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

If I look in you configuration you use both - inline edit and cell edit. Also to be a clear - you should either use cellEdit: true without using editRow and restoreRow or vice versa.

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.

30/03/2009
03:53
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Hello Tony and thanks for your response!

I corrected my config. Or I think.. Now it must be ok!!! 😀

But I am still having the same isues as I mentioned before.

jQuery(document).ready(function(){
    var lastSel;
jQuery("#list2").jqGrid({
    // the url parameter tells from where to get the data from server
    // adding ?nd='+new Date().getTime() prevent IE caching

    url:'include/jgrid.php?nd='+new Date().getTime(),

    datatype: "json",
    colNames:['ID','Κωδ.','Περιγραφή', 'Τεμ/Κιβ.', 'ΠοσÏŒτητα'],
    colModel:[
    {name:'id',index:'id', width:10, sortable: true, sorttype:"int", hidden:true, editrules:{edithidden:true} },
        {name:'code', sortable: true, width:10, sorttype:"text" },
        {name:'desc',index:'description', width:100, sortable: true, editable:false, sorttype:"text" },
    {name:'item',index:'item', width:12, sortable: true, editable:false, sorttype:"text" },
        {name:'amount',index:'amount', sortable: true, editable:true, width:15, sorttype:"int", formatter:'integer', editrules:{required: true, integer: true, minValue: 1} }    //formatter:'checkbox',editoptions:{value:“true:false”}
    ],
    pager: jQuery('#pager2'),

    rowNum:10,
    rowList:[10,20,30],

    imgpath: '../admin/js/jgrid/themes/basic/images',
    sortname: 'sequence',

    viewrecords: true,
    forceFit: true,

    sortorder: "asc",
    caption: "ΠροÏŠÏŒντα",
    width: 825,
    height: 250,
    loadonce: true,
    cellEdit: true,
    cellurl: "include/jgrid_update.php",
    cellsubmit: "clientArray",
    pager: jQuery('#pager2'),

    onRightClickRow: function(id){
    alert("Δεν επιτρέπεται το δεξί κλικ!");
    return false;
    },
    afterSaveCell: function(id){
    $('#list2 td.dirty-cell').removeClass("dirty-cell edit-cell");
    $('#list2 tr.edited').removeClass("edited");
    },
    afterEditCell: function(id){
    //alert("test 2");
   
    },
    beforeEditCell: function(id){
    //alert("test 345");
    //jQuery("#list2").setColProp('amount',{sortable: true});
    }
});

In the

cellurl: "include/jgrid_update.php",

The jgrid_update.php it has only one line

echo true;

Is that a problem....?

For alive example..

http://mexis.homeftp.org/durostick/partners/login.php

Use for Username (ÎŒνομα Χρήστη): 10.0049

It's for a Greek Project.... so the language is Greek.

In that page you have two autocomplete fields.

In the second write the keyword "Duro" and you will have some results.

When you click on a result then I add the product in the grid.

Anyway, you will fingure it out. The page is a Demo of course, so dont worry! 😀

Thanks...

30/03/2009
04:36
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Replace

cellurl: “include/jgrid_update.php”,

with

editlurl: “include/jgrid_update.php”,

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.

30/03/2009
05:08
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Hello Tony and thanks again!

I am sorry for the wrong conf. I thought that with celledit we have to use cellurl.

Ok, I replace it but again I have the same issues.

1) When I delete a row that I have click on the editable field then the grid is "frozen". If I delete a row but I have choose not an editable field, I don't have any problems.

Do I have to return something specific by jgrid_update.php?

2) When I am in an editable field A when I press to sort something and then go to an ediatable field B, the A is not closed as it sould be. And if I return to the A then in the field I see html... something like that...

<input name=”amount” id=”2_amount” style=”width: 98%;” type=”text”>

How can I make the grid when I click outside of a cell to close any cell that is in edit mode?

And why does the html DOM appears?

Regards,

Mexis

30/03/2009
05:20
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

I have some print screen here if they help you...

http://mexis.homeftp.org/problem/

1) When I delete a row that I have click on the editable field then the grid is “frozen”. If I delete a row but I have choose not an editable field, I don't have any problems.

As you can see after I delete the row then I can't even choose a row. Actually it doesn't appear the color selection but if I press delete then it will delete it even the row it isn't appeared selected. And I can't edit a cell after the deletion.

Picture: problem1

2) When I am in an editable field A when I press to sort something and then go to an ediatable field B, the A is not closed as it sould be. And if I return to the A then in the field I see html… something like that…

<input name=”amount” id=”2_amount” style=”width: 98%;” type=”text”>

Pricture: problem2_1, problem2_2

30/03/2009
06:02
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You use jqGrid 3.4 beta 2. Please upgrade to the latest, where you can not sort while in edit mode.

For me deleting work perfect. Also n problems

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.

30/03/2009
06:30
Avatar
dmexis
Member
Members
Forum Posts: 18
Member Since:
05/02/2009
sp_UserOfflineSmall Offline

Hello,

I installed jQuery Grid Plugin 3.4.3 but I still have the same problems.

Anyway, I guess then I am doing something wrong. Thanks for your help really...

I will use row, inline edit where I dont have any problems.

How can I disable sort in edit mode?

By setting

jQuery("#list2").setColProp('amount',{sortable: false});

on beforeEditCell ?

01/04/2009
02:18
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Clear your cache. Sortable property can not 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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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