AD
Administrator
Syncfusion Team
October 12, 2004 05:13 AM UTC
There is no code that sets e.Style.CellType = "MaskEdit" in the code you listed. Are you setting this somewhere else?
I would first try setting e.Style.CellType = "MaskEdit" in PrepareViewStyleinfo to see if that is what is missing. Or, since you want to set the whole column to be this celltype, you can just directly set it once in formload using either grid.GridBoundColumns(6).StyleInfo or grid.Binder.InternalCOlumns(6).StyleInfo to set both the CellType property and the Mask proeprty for this column. (Use GridBoundColumns if you have explicitly added them or you Binder.InternalCOlumns if you have not explicitly added gridboundcolumns.)
If neither of the other suggestions allow things to work, there are some style setting that do not work when being set within PrepareViewStyleInfo. (ReadOnly is one such setting.) I am not sure if trying to set MaskEdit is one of these or not. But if you are setting style.CellType = "MaskEdit" in your code somehow, then celltype = "MaskEdit" may be like ReadOnly in that it needs to be set earlier than PrepareViewStyleInfo. In these case, you can use grid.Model.QueryCellInfo to set these style properties. See this KB for sample code. http://www.syncfusion.com/Support/article.aspx?id=10351