Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
640
"Specified method is not supported" for fields, derived from BoundDataField
posted

I'm getting following error "Specified method is not supported"

here

   Infragistics.Web.UI.GridControls.FieldCollection.CreateCollectionObject(String objectType) +204
   Infragistics.Web.UI.GridControls.ControlDataField.Clone() +54
   Infragistics.Web.UI.GridControls.WebDataGrid.CopyFields() +156
   Infragistics.Web.UI.GridControls.WebDataGrid.FillFields() +108
   Infragistics.Web.UI.GridControls.WebDataGrid.DataBind() +497

when at least one field of my custom type added to Columns collection of WebDataGrid

Definition of my custom field type class is very simple

public class BoundFieldEx: BoundDataField
{
public string FieldFormat;
}

Execution code is very simple too

WebDataGrid grid1 = new WebDataGrid
{
ID = "grid",
Height = Unit.Pixel(200),
Width = Unit.Pixel(800)
};

....

GridField col = new BoundFieldEx
{
Key = "Customer.Company",
DataFieldName = "Customer.Company"
};
col.Header.Text = "Company";
col.Header.Tooltip = "Company";
grid1.Columns.Add(col);

....

grid1.AutoGenerateColumns = false;
grid1.DataSource = ds;
grid1.DataBind();

 

What is wrong with my custom field type? How can I avoid this exception?

And I really need field type, derived from BoundDataField.

Version I'm using: 10.3 SR2120 for ASP.Net