jQWidgets Forums
jQuery UI Widgets › Forums › TreeGrid › How can I do hide custom buttons ?
Tagged: html5 treegrid, javascript treegrid, jquery treegrid, treegrid
This topic contains 3 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 5 months ago.
-
Author
-
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
Hi mustafa,
To hide something which you created, probably the easiest way is through jQuery Selector by CSS Class.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comyes right I do like this
$(“#update”).hide();but I just want to hide the sub rows
Hi mustafa,
You can’t hide TreeGrid rows. There is no API for that.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.