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() +497when at least one field of my custom type added to Columns collection of WebDataGridDefinition of my custom field type class is very simplepublic 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
Hi, Dave
Thank you very much again. I've already implemented ICollectionObject interface for my column and looking forward for next Service Release.
Andrey.
Hi Andrey,
It will not hurt to add the code I posted now since it will be needed later. I've alerted DS and they will be attaching your case to the bug. You'll then receive an e-mail when the Service Release ships. Right now, it is forecast for the beginning of September.
-Dave
Hi, David Young
Thank you for your reply.
When new Service Release will be available? How can I get to know when it is released?
As far as I understand implementation of ICollectionObject is useless in my case, with SR2120, right?
Regards,Andrey Abramov
Hi Andrey Abramov,
I investigated this and found that there was actually a bug surrounding it. It is sumbitted as 83810 and has been fixed. It will be available in the next Service Release. But there will be one other thing you'll need to do in order to make it work. You'll have to make your class definition as follows:
public class BoundFieldEx: BoundDataField, Infragistics.Web.UI.ICollectionObject
And inside your class somewhere, you need to add the following method:
string ICollectionObject.GetObjectType() { string name = this.GetType().AssemblyQualifiedName; name = name.Replace('.', '~'); return name; }
That will allow the grid to find the type and create your column, but only after this bug fix is in your code. I will have Developer support follow up to attach your case and see if you need this escalated.
regards,
David Young