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
Hide inline del button
14/09/2012
12:52
Avatar
tomaf59
Member
Members
Forum Posts: 6
Member Since:
14/09/2012
sp_UserOfflineSmall Offline

Hello,

Hello,

I see a bug with the hide inline del button.

I hide this button like this:

gridComplete: function(){
                 var ids = $("#tableLesVersions").jqGrid('getDataIDs');
                  for(var i=0;i < ids.length;i++){
                      var cl = ids[i];
                    jQuery('tr#'+ids[i]+' td:last div:first div.ui-inline-del',jQuery(this)).hide();
                   }
  }

but when I edit a row and then I click on the inline save or in the inline cancel button,  the inline del button reappear.

Can you have the answer?

14/09/2012
13:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

If you use the predefined formatter you can disable this button with options

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.

14/09/2012
16:00
Avatar
tomaf59
Member
Members
Forum Posts: 6
Member Since:
14/09/2012
sp_UserOfflineSmall Offline

First thank you for your very quick answer.

But in fact, I hava some rows which can have inline del button and some rows not.

I will try to use the predefined formatter maybe I will have to do the inverse that's mean hide inline del button for eaches rows and just show for the rows I want.

17/09/2012
15:32
Avatar
tomaf59
Member
Members
Forum Posts: 6
Member Since:
14/09/2012
sp_UserOfflineSmall Offline

I confirm that it doesn't work.

If I set

formatter:'actions', formatoptions:{keys:true,delbutton: false}

It will never show the inline-del button even if i set :

gridComplete: function(){
                 var ids = jQuery("#tableLesFlux").jqGrid('getDataIDs');
                  for(var i=0;i < ids.length;i++){
                      var cl = ids[i];
                   var disponibiliteVal = jQuery('#tableLesFlux').getCell(cl, 'disponibilite');
                   if (disponibiliteVal.indexOf("production") < 0){
                    //Show delete button
                    jQuery('tr#'+ids[i]+' td:last div:first div.ui-inline-del',jQuery(this)).show();
                   }
                  }
             }

Someone have an idea?

25/09/2012
17:03
Avatar
tomaf59
Member
Members
Forum Posts: 6
Member Since:
14/09/2012
sp_UserOfflineSmall Offline

nobody ?

27/09/2012
15:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Just tested and it is ok for me.

Not sure what you do and which version do you use.

Which version is used?

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.

04/10/2012
14:50
Avatar
tomaf59
Member
Members
Forum Posts: 6
Member Since:
14/09/2012
sp_UserOfflineSmall Offline

Hello tony,

I use 4.3.3 version.

Here's the code I use:

/*GRID*/
    jQuery("#flux").jqGrid({
        url: "flux/getAll.do",
        mtype: 'POST',
        datatype: "json",
        cache: false,
           colNames:['Identifiant', 'Libellé', 'Code','Etat', 'Actions'],
           colModel:[
               {name:'id',    key : true,    index:'id',    hidden:true},
               {name:'libelle',index:'libelle',width:170, editable:true,editrules:{required:true,custom:true, custom_func:checkLibelle}, editoptions: {maxlength:45}},
               {name:'code', index:'code',align:'center', editable:true,editrules:{number:true,required:true}, editoptions: {maxlength:10}},
               {name:'disponibilite', align:'center',index:'disponibilite',sortable:false,editable:false, formatter:loadEtat},
               {name: 'myac', width:80, fixed:true, sortable:false, resize:false, formatter:'actions', formatoptions:{keys:true}}
           ],
           rowNum:20,
        viewrecords: true,
           sortname: 'id',
        sortorder: "asc",
        jsonReader: {
            repeatitems : false
        },
        height: 'auto',
        caption: "Affichage des flux",
        gridComplete: function(){
                 var ids = jQuery("#flux").jqGrid('getDataIDs');
                  for(var i=0;i < ids.length;i++){
                      var cl = ids[i];
                   var disponibiliteVal = jQuery('#flux').getCell(cl, 'disponibilite');
                   if (disponibiliteVal.indexOf("production") > 0){
                    //Hide delete button
                    jQuery('tr#'+ids[i]+' td:last div:first div.ui-inline-del',jQuery(this)).hide();
                   }
                  }
             }
    });

Something's wrong?

Can you post the code you use?

Thanks

17/10/2012
17:09
Avatar
tomaf59
Member
Members
Forum Posts: 6
Member Since:
14/09/2012
sp_UserOfflineSmall Offline

nobody ?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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