This is a migrated thread and some comments may be shown as answers.

GridMaskedColumn error when entering edit mode

3 Answers 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
J-F Allard
Top achievements
Rank 1
J-F Allard asked on 22 Mar 2010, 03:15 PM
Hi, I've some troubles using the GridMaskedColumn from code behind with version 2010.1.309.35.

Here is how I add dynamically my column:
GridMaskedColumn maskColumn = new GridMaskedColumn();  
columns.Add(maskColumn);  
 
maskColumn.UniqueName = myDataField;  
maskColumn.HeaderText = myHeaderText;  
 
maskColumn.Mask = myMask;  
maskColumn.DataField = myDataField;  
maskColumn.SortExpression = myDataField;  
maskColumn.ShowSortIcon = true;  
maskColumn.ShowFilterIcon = true;  
maskColumn.ReadOnly = !editable; 

I'm using a "aaaa" mask to make sure it's the easiest as possible on a varchar(50) field which has valid values.  I have the same problem when table is empty.

It works great when displayed.  The filters are working correctly with defined mask(while testing something else than 'aaaa') but as soon as I click the edit button, I get an : Cannot create column with the specified type name: GridMaskedColumn

Here is the stack of the error. 
[GridException: Cannot create column with the specified type name: GridMaskedColumn]  
   Telerik.Web.UI.GridColumnCollection.CreateColumnFromTypeName(String columnTypeName) +1211  
   Telerik.Web.UI.GridColumnCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState) +428  
   Telerik.Web.UI.GridTableView.LoadStructureState(Object SavedStructure) +354  
   Telerik.Web.UI.RadGrid.LoadTableViewStructure(IEnumerator stateEnumerator, GridTableView tableView) +101  
   Telerik.Web.UI.RadGrid.LoadViewState(Object savedStateObject) +276  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +183  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134  
   System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221  
   System.Web.UI.Page.LoadAllState() +312  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1661  
 
 

I checked and I'm not doing anything special with the column, even not providing mask gives the same error.

Thanks for your help solving this issue.

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 25 Mar 2010, 08:13 AM
Hi J-F Allard,

I reviewed the setup, and the code looks correct. To further trace the issue, however, it will be best if you open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will review it locally, and get back to you with more information on the matter.

Sincerely yours,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
DeveloperX
Top achievements
Rank 1
answered on 07 Oct 2010, 10:01 PM
Was this issue resolved?
0
Mira
Telerik team
answered on 13 Oct 2010, 10:47 AM
Hello Tyrone,

As my colleague Yavor has said, based on the supplied information, we cannot determine what is causing the error. Please make sure that the grid is created according to the Programmatic creation help topic.

If the issue persists, please open a formal support ticket and send us a small working project, demonstrating your full setup and showing the unwanted behavior.
We will debug it locally and get back to you.

Thank you in advance for the cooperation.

Kind regards,
Mira
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
J-F Allard
Top achievements
Rank 1
Answers by
Yavor
Telerik team
DeveloperX
Top achievements
Rank 1
Mira
Telerik team
Share this question
or