We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Formreadonly

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?

1 Reply

AD Administrator 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.

Loader.
Live Chat Icon For mobile
Up arrow icon