AD
Administrator
Syncfusion Team
October 21, 2003 06:44 PM UTC
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'..
CN
Clift Norris
October 22, 2003 01:31 PM UTC
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