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
550
Custom control based on xamTextEditor not adding new row
posted

I have a custom control (that does a lookup) which is based on a XamTextEditor.  This is hosted in a XamDataGrid in the first column.  Everything works about right except that updating the Value of the control does not raise any events to force a new record to be added.  By this I mean that if I have a straight XamTextEditor then as soon as you add some text it causes the RecordAdded event which adds a record.

With my control it does not raise any events and as such there is no record behind it.  Is there a way to force it?

I set the value

SetValue(ValueProperty, myValue);

Thanks

Parents
No Data
Reply
  • 10
    posted

    Hello Jifman,

    When making custom controls there are several things which could go wrong, and I'm assuming that you probably forgot to bind your custom control's text property to the relative source (the xamDataGrid)...

    You can have something like that in the EditTemplate of your custom control:

    Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"

    And another problem occurs when the collection you're using doesn't implement INotifyPropertyChanged.

    If this does not help, could you please sent some more information about your custom control.

    Regards

    Petar

Children
No Data