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.
Unfortunately, activation email could not send to your email. Please try again.

Formreadonly

Thread ID:

Created:

Updated:

Platform:

Replies:

42322 Mar 27,2006 03:47 AM Mar 27,2006 06:07 AM Windows Forms 1
loading
Tags: GridControl
resmi
Asked On March 27, 2006 03:47 AM

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?

Administrator [Syncfusion]
Replied On March 27, 2006 06:07 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;