>>Hi All
>>
>>I have found something very strange. I have a member class setup of both columns and headers. I just tried changing the class column at run time and found the class that the class that I added was on the wrong column. In further investigation I found that the grid was adding a column 0 at run time. In the designer, column 1’s name is called acolumn1 and at run time, column 1’s name is acolumn0. The class that I changed is now showing up on column2 named acolumn1. Is this a bug or am I doing something wrong?
>>
>>
>>Thanks
>
>How are you adding your column at runtime? Let's see the code.
Here is the class.
DEFINE CLASS cColumn AS column
HeaderClass = "cheader"
HeaderClassLibrary = "cgridclass.prg"
cControlClass = "cgrid_textbox"
cControlClassLib = "cgridcontrols.vcx"
cControlName = ""
PROCEDURE init()
LOCAL lcControl
IF NOT EMPTY(this.cControlClass) AND NOT EMPTY(this.cControlClassLib)
IF EMPTY(this.cControlName)
this.cControlName = this.cControlClass
ENDIF
this.NewObject(this.cControlName,this.cControlClass,this.cControlClassLib)
this.CurrentControl=this.cControlName
DODEFAULT()
FOR EACH loControl IN this.Controls
IF PEMSTATUS(loControl,"visible",5)
loControl.visible = .t.
ENDIF
NEXT
ENDIF
ENDPROC
ENDDEFINE