/// <include file='doc\ColumnCollectionEditor.uex' path='docs/doc[@for="DataGridColumnCollectionEditor.EditValue"]/*' /> /// <devdoc> /// <para> /// Edits the value specified. /// </para> /// </devdoc> public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { IDesignerHost designerHost = (IDesignerHost)context.GetService(typeof(IDesignerHost)); Debug.Assert(designerHost != null, "Did not get DesignerHost service."); Debug.Assert(context.Instance is DataGrid, "Expected datagrid"); DataGrid dataGrid = (DataGrid)context.Instance; BaseDataListDesigner designer = (BaseDataListDesigner)designerHost.GetDesigner(dataGrid); Debug.Assert(designer != null, "Did not get designer for component"); designer.InvokePropertyBuilder(DataGridComponentEditor.IDX_COLUMNS); return(value); }