Iron Speed Technical Forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
mohamed mahrose

Registered:
Posts: 9
Reply with quote  #1 
Hi,

i want to remove "edit button" from table control .

i tried this code but in preRender function but i want to delete the button:

ERP.UI.Controls.ShowADM_USERSTable.ADM_USERSTableControl myTable = (ERP.UI.Controls.ShowADM_USERSTable.ADM_USERSTableControl)(this.FindControlRecursively("ADM_USERSTableControl"));

if (myTable != null)
                {
                    foreach (ADM_USERSTableControlRow recordCtl in myTable.GetBaseRecordControls())//GetSelectedRecordControls())
                    {
                        recordCtl.ADM_USERSRowEditButton.Visible = false;
   
                    }
                }
 

__________________
Mohamed Mahrose
Solutions and Integration Sector
afisher

Avatar / Picture

Moderator
Registered:
Posts: 787
Reply with quote  #2 
Why not just delete it via the Quick Layout Editor?
__________________
Alan Fisher Chairman Iron Speed, Inc. @afisher1024
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,962
Reply with quote  #3 
If you mean hiding the ADM_USERSRowEditButton without condition, all you have to do is to add a single line @ TableControlRow PreRender event:
 
private void RecordControl_PreRender(object sender, EventArgs e)
                {
                   
                    ADM_USERSRowEditButton.visible = false;
                }
 
 
As I mentioned in your other post, it can also be hidden using Control Level Security or just delete it via the Quick Layout Editor as per Alan.
 
 
 
Cheers,
Jimi J

__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

mohamed mahrose

Registered:
Posts: 9
Reply with quote  #4 

i want delete it at run time because i want set user permission at run time.

 so where can i find this function "RecordControl_PreRender", i wrote this code  "ADM_USERSRowEditButton.visible = false;"   at   "page_prerender" function.

Regards,


__________________
Mohamed Mahrose
Solutions and Integration Sector
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,962
Reply with quote  #5 
InsertRecordControl_PreRender.jpg 

__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

mohamed mahrose

Registered:
Posts: 9
Reply with quote  #6 
thanks Jaime Jegonia  for your assistance.

it works well. [smile]

__________________
Mohamed Mahrose
Solutions and Integration Sector
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement