To accomplish this, you will need to get a reference to the Add New Button element on the client. Once we have that reference, then it is just a matter of setting the "display" property to "none" as follows:
In JavaScript:
//When the Grid initializes, you can use the ID that is
//available in the Event Arguments to get the AddNew
//button's Element. Once we get the Element, set the
//Display type to "none"
function UltraWebGrid1_InitializeLayoutHandler(gridName){
//This is the naming convention for "Band 0 Add New":
var e = document.getElementById(gridName + '_an_0');
//Bands 1, 2, etc would be:
//var e = document.getElementById(gridName + '_an_1');
//var e = document.getElementById(gridName + '_an_2');
if(e){
e.style.display = 'none';
}
}
Wednesday, December 3, 2008
Hiding and showing Add New buttons for specific Bands in WebGrid
Posted by Suryan at 11:35 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment