Hi Team,



I would like to apply the "enabled" property to active row buttons COPY & DELETE in  contact section.



 

I have tried the below code but it doesn't work.

{
		"operation": "merge",
		"name": "DataGridActiveRowCopyAction",
		"values": {
		//"enabled": {bindTo: "ShowButtonforAdmin"},
		"enabled": false,
		}
},
{
		"operation": "merge",
		"name": "DataGridActiveRowDeleteAction",
		"values": {
		//"enabled": {bindTo: "ShowButtonforAdmin"},
		"enabled": false,
		}
},

 

 

Kindly guide me to achieve the Enable/Disable operation in active row buttons of contact section (COPY & DELETE).



Thanks in advance!

 

 

 

Best Regards,

Bhoobalan P.

Like 0

Like

4 comments

Hi Bhoobalan, 

 

please use "visible" : false

 

instead of 

"enabled": false

and the button will be hidden.

 

Best Regards, 

 

Bogdan L.

Bogdan Lesyk,



Thanks much for the response!



Yes, I have tried with visible and its working but I wanted to Disable the button for few users. The button should be displayed and disabled.





Could you please guide on achieving it?

Bhoobalan Palanivelu,

 

I'm not sure that it's possible and we don't have practical examples of such implementation using js code.

 

However, the best way to achieve it will be setting up the Object permission, it will be much easier for you and best in terms of implementation: 

 

 

Regards, 

 

Bogdan L.

 

Bogdan Lesyk,



Thanks, This OBJECT permission is OOTB and it works.

I tried to depict the button to user as disabled and to inform/give an idea as that this button is not available to click.



Thanks,

Bhoobalan P.

Show all comments

Hi Community,

Every after record item changes, I am calling this method this.reloadGridData() to refresh the grid in order the recent changes will be displayed.

Now I want after reloading, I want the last active row to be re-selected again. Any idea how can I possibly do this?

Like 0

Like

3 comments

Start from debugging the reloadGridData method and find how it works. Keep your attention on the "onGridDataLoaded" method. Additionally, please debug and find what happens after selecting a record.

Eugene Podkovka,

 

Hi Eugene, 

 

How to debug the reloadGridData method?

Where to find this method?

Hello, 

 

I'd suggest to check the corresponding replacing view model schema where the logic is implemented.

This article (and connected to it) could be helpful for better understanding. 

Hope it clarifies!

Best regards,

Anastasiia

Show all comments