The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
hi
iam having forms with different controls like GGC,Textbox etc.I want to make the form controls Noneditable,sometimes editable,readonly etc based on the user logged in.Is there any way to do this?
ADAdministrator Syncfusion Team March 27, 2006 11:07 AM UTC
Hi,
You can make the control non-editable by setting the Enabled property to false in the control. To make it editable again set it to true. To make a control read only, set the ReadOnly property of the control. Here are the three scenarios.
- If the user happens to be the Administrator then set all the control as Enabled by setting the Enabled property in each control ( e.g., this.gridGroupingControl.Enabled = true ).
- If the user is a Limited user, then enable or disable or read only which ever controls are applicable.
- And if the user is a viewer, then set all the controls or form as disabled. ( this.form1.Enabled = false ) or ReadOnly as per need.
GridGroupingControl :
this.gridGroupingControl1.TableDescriptor.AllowEdit = false; // ReadOnly
this.gridGroupingControl1.Enabled= false; // Disable ggc
TextBox :
this.textBox1.ReadOnly = true;
this.textBox1.Enabled = false; // To enable make it true
Let us know if this helps.
Best regards,
Madhan.