jQWidgets Forums

jQuery UI Widgets Forums TreeGrid How can I do hide custom buttons ?

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • How can I do hide custom buttons ? #65550

    mustafa
    Participant

    hello I am using custom buttons, How can I do hide the substructure buttons in the bottom menus alone?

        
    

    var buttonrenderer = function (index, row, columnfield, value, defaulthtml, columnproperties, rowdata) {
    return ‘<button type=”button” class=”btn default grey-cascade” onclick=”UpdateStructureClick(‘ + index + ‘);”>Update</button>  <button href=”#” type=”button” class=”btn default red” onclick=”DeleteStructureClick(‘ + index + ‘)”>Delete</button>  <button href=”#” type=”button” class=”btn default” onclick=”SubStructureClick(‘ + row.ModulStructureID + ‘,’ + index + ‘)”>Sub Structure</button>’;
    };`

    columns: [
    { text: ‘Structure Name’, datafield: ‘DisplayName’, width: ‘15%’ },
    { text: ‘Modul Name’, datafield: ‘ModulName’, width: ‘15%’ },

    { text: ‘Menu’, datafield: ‘IsMenu’, width: ‘15%’, threestatecheckbox: false, columnGroup: ‘group’, columntype: ‘checkbox’ },
    { text: ‘Active’, datafield: ‘IsActive’, width: ‘15%’, threestatecheckbox: false, columnGroup: ‘group’, columntype: ‘checkbox’ },
    { text: ‘Vessel Availability’, datafield: ‘IsVesselAvailability’, columnGroup: ‘group’, width: ‘15%’, threestatecheckbox: false, columntype: ‘checkbox’ },
    { text: ‘Process’, datafield: ‘id’, cellsrenderer: buttonrenderer, width: ‘30%’ },
    ],
    columnGroups: [
    { text: ‘ACTIONS’, name: ‘group’ }
    ]
    });`

       var source = {
            dataFields: [
            { name: 'ModulStructureID', type: 'string' },
            { name: 'ParentID', type: 'string' },
            { name: 'ModulID', type: 'string' },
            { name: 'DisplayName', type: 'string' },
            { name: 'ModulName', type: 'string' },
            { name: 'Description', type: 'string' },
            { name: 'OrderNumber', type: 'number' },
            { name: 'TargetPath', type: 'string' },
            { name: 'Icon', type: 'string' },
            { name: 'IsMenu', type: 'bool' },
            { name: 'IsActive', type: 'bool' },
            { name: 'IsVesselAvailability', type: 'bool' }
            ],
            hierarchy:
            {
                keyDataField: { name: 'ModulStructureID' },
                parentDataField: { name: 'ParentID' }
            },
            dataType: "json",
            async: false,
            id: 'ModulStructureID',
            localdata: GetStructures()
        };

    I have a problem how can I do process and actions text center ?

    thank you

    How can I do hide custom buttons ? #65564

    Peter Stoev
    Keymaster

    Hi mustafa,

    To hide something which you created, probably the easiest way is through jQuery Selector by CSS Class.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    How can I do hide custom buttons ? #65594

    mustafa
    Participant

    yes right I do like this
    $(“#update”).hide();

    but I just want to hide the sub rows

    How can I do hide custom buttons ? #65600

    Peter Stoev
    Keymaster

    Hi mustafa,

    You can’t hide TreeGrid rows. There is no API for that.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.