shahvali
Registered:1328946561 Posts: 9
Posted 1329394994
Reply with quote
#1
hi i want to remove delete icon in the grid by coding in forms. thanks
Attached Images
akeshgupta
Iron Speed MVP Design, Develop & Deliver
Registered:1082888267 Posts: 1,095
Posted 1329398960
Reply with quote
#2
On the Pre Render event of the Row, you can write custom code to hide the delete button.
__________________Akesh Gupta
Light Speed Solutions, LLC.
If I rest, I will rust ! Let's share the knowledge !
shahvali
Registered:1328946561 Posts: 9
Posted 1329466345
Reply with quote
#3
thanks for help but i need the code of the part of removing delete icon.
akeshgupta
Iron Speed MVP Design, Develop & Deliver
Registered:1082888267 Posts: 1,095
Posted 1329481436
Reply with quote
#4
The Delete button is a control. You can very easily say:
Me.DeleteButton.Visible = False
for the rows where you wish to hide it based on a condition.
__________________Akesh Gupta
Light Speed Solutions, LLC.
If I rest, I will rust ! Let's share the knowledge !
mhweiss
MVP Consultant
Registered:1125349770 Posts: 569
Posted 1329485121
Reply with quote
#5
Hello There is a code customization for changing the background of a row based on a value in a field in the row of a table control. Take a look at this customization and then substitute Akesh's line of code for the code that changes the color of the row. Alternately, click on the Documentation tab in Design view, right click on the Prerender event for the Table Control Row Control class and select "Insert". ISD will insert the Prerender override stub in the proper place in the code behind. You can then apply your own logic to test the value of a control and hide the Delete button using Akesh's example. Best Regards, Michael
__________________michael@occasiosystems.com
http://www.occasiosystems.com
JimiJ
MVP Developer
Registered:1112254853 Posts: 1,962
Posted 1329516120
Reply with quote
#6
Perhaps, applying security roles might be even more practical. Cheers, Jimi J
__________________ Jaime Jegonia
Iron Speed MVP Developer ". . . and whoever sows generously will also reap generously" 2 Cor 9:6
shahvali
Registered:1328946561 Posts: 9
Posted 1329559385
Reply with quote
#7
Quote:
Originally Posted by
akeshgupta The Delete button is a control. You can very easily say:
Me.DeleteButton.Visible = False
for the rows where you wish to hide it based on a condition.
Hi please read my problem carefully then responds give to me thanks
Gerard
Registered:1102561907 Posts: 588
Posted 1329637162
Reply with quote
#8
All the options will be valid without further info on what you want to acheive
the Me.DeleteButton.Visible = False is valid code for the code editor when clicked on
the cell
The code customization wizard with the Me.DeleteButton.Visible = False instead is also valid code which may or may not meet your requirements.
Security also can code the button away with a single slection
the application generation options can remove it at source.
Do you need code remove every delete button on every page or just on one table or only selected records or only for selected persons.
If there are further requirements you will have to spell it out we cannot read minds and as ISD has many different ways to achieve things people will use their vast experience to help you out and point you into options you may or may not know about.
Gerard