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.

Changes in ColStyles don't 'take' in Collection Editor?

Thread ID:





8121 Oct 21,2003 12:42 PM Oct 22,2003 09:31 AM Windows Forms 2
Tags: GridControl
Clift Norris
Asked On October 21, 2003 12:42 PM

I've dropped a grid onto a form, and (using the Designer) changed the Column1 CellType from TextBox to Static. The changes worked great. I then decided to try CellType RichText. This turned out to NOT be what I really needed, so I attempted to change the CellType *back* to Static. The change to Static appeared to work in the CollectionEditor, but after I clicked "OK", the CellType always reverted back to RichText whenever I revisted the CollectionEditor. I MUST be missing something silly here. Why is it that my changes in the CollectionEditor are ignored? (I'm also seeing ReadOnly being 'stuck' on True.) Thanks for your help, -Clift

Administrator [Syncfusion]
Replied On October 21, 2003 02:44 PM

I think it is the readonly that is causing the problem. When you set something readonly, that locks all the properties. We will correct this problem in our code but for the time being, I think you will have to do a little trick to unlock the readonly so you can change things. Open up the form on the designer. Then open the code window for the form as well. In the code window, add this line to the designer generated code after the grid is created but before the code setting the grid properties. // // gridControl1 // this.gridControl1.IgnoreReadOnly = true; //add this line... Then go back to the designer and change the ColStyles' ReadOnly property to false, and then immediately save and run the code. After that, I think you should be able to change the other properties like CellType in the designer and get things to 'take'..

Clift Norris
Replied On October 22, 2003 09:31 AM

Clay, Thanks for your speedy reply! Your suggestion worked fine and I got my ColStyle set just the way I wanted it to be. I added the .IgnoreReadOnly=true line, but it needed to be immediately following the line that 'new's the grid. Otherwise the Form designer complained: this.gridControl1 = new Syncfusion.Windows.Forms.Grid.GridControl(); this.gridControl1.IgnoreReadOnly=true; // added ((System.ComponentModel.ISupportInitialize)(this.gridControl1)).BeginInit(); this.SuspendLayout(); // // gridControl1 // // code to initialize the grid... After I got the ReadOnly property returned to False using the Syncfusion designer, I was suprised to see that my .IgnoreReadOnly=true line had been REMOVED by the Form designer! Anyway, I'm a 'happy camper' now. Thanks for all your help! -Clift


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.