FORUMS

c360 Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



how can we forbidden "Print" and "Export...Expand / Collapse
Message
Posted 12/24/2007 3:56:25 AMPost #1912
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
i want to forbidden "Print" and "Export Excel" buttons for some roles.

how can we do?

"Happy new years"

Posted 1/16/2008 11:29:56 AMPost #1927
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
I'm guessing you are talking about the "Print" and "Export to Excel" buttons on our Grid control??? You can remove these buttons by setting the "AAlowPrint" and "AllowExportToeXcel" properties to false.

Jeremie Desautels

VP, Product Marketing

c360 Solutions

Posted 1/16/2008 12:17:41 PMPost #1929
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I have almost the same question:

how to remove the "save and close" and "Save and New" buttons on an edit page?

I think it should be
Instance.ButtonMenu.Items.Remove("name_of_button")

but I can't find the button names anywhere..
Posted 1/16/2008 12:32:13 PMPost #1930
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
The name of the button is not the indexer for the "ButtonMenu.Items" collection. Therefore, to remove a button from this collection you must get a reference to the button in question and remove it from the collection. Something like this:

Instance.ButtonMenu.Items.Remove(Instance.ButtonMenu.Items[4]);

Also, keep in mind that there is a property called "IncludeStandardButtons" which you can set to "false" to remove all the buttons at once.

Jeremie Desautels

VP, Product Marketing

c360 Solutions

Posted 1/16/2008 12:56:05 PMPost #1931
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
thanks for the quick reply

I tried your code, but it returns an outofrangeexception (I tried values from 0 to 4)
I also tried the removeAt (int index) method which should give the same result, but is easier to use (am I right?), but it also returns an outofrangerexception.

Posted 1/16/2008 1:05:02 PMPost #1932
 

c360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guruc360 Product Guru
"4" was just an example. You need to figure out the index of the button you actually want to remove (I don't know by heart the index of the "Save" and the "Save and Close" button").

Jeremie Desautels

VP, Product Marketing

c360 Solutions

Posted 1/16/2008 2:18:05 PMPost #1935
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I know it was an example

But it was my mistake, I was trying to remove the buttons from the buttonbar, before it was built, so that's why I got the outofrangeexception.

maybe useful information for other users:
"Save" is index[0]
"Save and Close" is index[1]
"Save and New" is index[2]

Thanks for helping me with this Jeremy!
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Jeremie Desautels, john.gravely, kanika.jackson, Arvind Raman, Ken Champion

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 8:37pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.187. 10 queries. Compression Enabled.