You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

to make grid delete butotn disabled through code

3 replies [Last post]
deepikakubba's picture
User offline. Last seen 9 years 5 weeks ago. Offline
Joined: 06/29/2010
Posts: 26

Hi,,

Can anybody help me in below code:

I want to make grid delete button disabled through peoplecode

I tried using :---------
-------------------------------------
&GR= getgrid(page.pagename,"grid_name");
&GR.deleteenabled=false;
-------------------------------------
i need it on click of some other button..
so i wrote this code on fieldchange event of that record field(button)

but its not working ......
I tried with rowset also....but if rowset comes into picture then the record of my grid fields is one work record.. and for work record.. seems i can not do getrowset ..

please suggest ASAP. the right way
Thanks,
Deepika

Lepa's picture
User offline. Last seen 2 years 20 weeks ago. Offline
Joined: 06/23/2008
Posts: 591
Re: to make grid delete butotn disabled through code

You need to use a rowset object and loop through the rows and disable the delete button on each row in the grid.

something like:

Local Rowset &rs;
&rs = GetLevel0()(1).GetRowset(Scroll.scroll_table);

For &i = 1  To &rs.ActiveRowCount
     &rs.GetRow(&i).deletenabled = false;
End-For;

Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog

deepikakubba's picture
User offline. Last seen 9 years 5 weeks ago. Offline
Joined: 06/29/2010
Posts: 26
Re: to make grid delete butotn disabled through code

Hi leepa.

Thanks

Forex's picture
Forex (not verified)
Re: to make grid delete butotn disabled through code

Thank you for sharing this code. :)