Item with null value not editable

Grids for WPF Forum

Posted 15 years ago by Sascha Schwegelbauer
Avatar
Hi Actipro,

I'm binding to a collectionviewsource.
Everything works fine - except when the value of a property is null, propertygrid seems to be unable to set its value. I tried to work around with a default value, but no luck.
What could be the problem?

Thanks for your help.

Comments (5)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Sascha,

For this type of problem, you would need to send over a small sample project to our support address.

But it sounds like either the PropertyGrid cannot determine the type of the property or there is no TypeConverter available. This depends largely on how you are using the control, which is why the sample project is needed.


Actipro Software Support

Posted 15 years ago by Sascha Schwegelbauer
Avatar
Hi Actipro,

your idea with the grid not being able to determine the type of the property is good.
Can I hardcode the the type in xaml / codebehind?

Thanks
Sascha
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Sascha,

Again it's hard to say without seeing a sample project, as there are several ways you could be using the PropertyGrid. But typically the class definition or property definition is decorated with the TypeConverterAttribute.


Actipro Software Support

Posted 15 years ago by Sascha Schwegelbauer
Avatar
Hi again,

this is the property of the object which I'm using - the datatype should be clear.
To be honest, I don't understand why the propertygrid doesn't recognize it.

/// <summary>
/// There are no comments for Property InternalDesc in the schema.
/// </summary>
[global::System.Data.Objects.DataClasses.EdmScalarPropertyAttribute()]
[global::System.Runtime.Serialization.DataMemberAttribute()]
public string InternalDesc
{
  get
  {
     return this._InternalDesc;
  }
  set
  {
     this.OnInternalDescChanging(value);
     this.ReportPropertyChanging("InternalDesc");
     this._InternalDesc = global::System.Data.Objects.DataClasses.StructuralObject.SetValidValue(value, true);
     this.ReportPropertyChanged("InternalDesc");
     this.OnInternalDescChanged();
  }
}
private string _InternalDesc;
partial void OnInternalDescChanging(string value);
partial void OnInternalDescChanged();
Maybe you can give me a hint now?
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Sascha,

Sorry, strings are should be fully handled. Please put together a small sample project that shows the issue and email it over to our support address. Once we have that we can take a look.


Actipro Software Support

The latest build of this product (v24.1.3) was released 24 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.