We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

SfGridDate does not insert to the cell

Hi, I have a class:

public class MyModel;
{
public int A { get; set;}
public int B{ get; set;}
public int C{ get; set;}
}

public class MyViewModel
{
public MyModel Prop { get { return _a ; } }
private MyModel _a= new MyModel();
}

<sync:SfDataGrid.Columns>
    <sync:GridTemplateColumn HeaderText="Тест" MappingName="Prop.A">
      <sync:GridTemplateColumn.CellTemplate>
        <DataTemplate >
          <TextBlock Text="{Binding Prop.A}"/>
        </DataTemplate>
      </sync:GridTemplateColumn.CellTemplate>
      <sync:GridTemplateColumn.EditTemplate>
        <DataTemplate >
          <MyControl ObjectProperty="{Binding Prop, Mode=OneWay}"/>
        </DataTemplate>
      </sync:GridTemplateColumn.EditTemplate>
    </sync:GridTemplateColumn>
  </sync:SfDataGrid.Columns>

When I try to copy / paste a cell appears an exception "An unhandled exception of type 'System.NullReferenceException' occurred in Syncfusion.SfGrid.WPF.dll". Because of the lack Setter in Prop. But I do bind to Prop.A




3 Replies

AN Ashok N Syncfusion Team February 11, 2015 01:18 PM UTC

Hi Ivan,

We are sorry about the inconvenience caused.

We are able to reproduce the reported “An unhandled exception of type 'System.NullReferenceException'” issue when we paste the value to Complex property and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

 https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

Please let us know if you require further assistance.

 Thanks,

Ashok




IV Ivan replied to Ashok N February 12, 2015 08:33 AM UTC

Hi Ivan,

We are sorry about the inconvenience caused.

We are able to reproduce the reported “An unhandled exception of type 'System.NullReferenceException'” issue when we paste the value to Complex property and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates

 https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

 

Please let us know if you require further assistance.

 Thanks,

Ashok



Thanks for the answer, and there is a problem with the events OnGridPasteContent/GridCopyContent. GridCopyPasteEventArgs does not contain an object that has been copied / pasted


AN Ashok N Syncfusion Team February 13, 2015 02:42 PM UTC

Hi Ivan,

We are sorry about the inconvenience caused.

We have analyzed on your query and we regret inform you that, it is not possible to get the copy/paste content by using GridCopyPasteEventArgs. Currently we are working on Copy/Paste enhancement, In this enhancement we will provide provision to some methods.  By using this methods you can get the copy/paste content. This enhancement will be included in our main release 2015 Volume 1.

Please let us know if you require further assistance.
Thanks,
Ashok



Loader.
Live Chat Icon For mobile
Up arrow icon