Intercepting events for numeric updown in datagrid template column

Posted by: mayur.purandare on 10 December 2017, 3:34 am EST

    • Post Options:
    • Link

    Posted 10 December 2017, 3:34 am EST

    Hello,

    I am using C1 Datagrid. I am using DataGridTemplateColumn in order to show numeric updown/combobox in a datagrid cell.

    This column is data binded with a property in viewmodel and is updated in a background loop.

    User is also allowed to update this using numeric updown and if user updates the value, preference is needed to be given to that value.

    Is there any way this can be achieved? I tried to intercept ValueChanged event of the numeric updown through EventToCommand (MVVM) however this didn’t work as I get only value not the sender. (I need to take certain decisions over the sender)

    I tried to do in the code behind but didnt not work.

    Also tried with DataGridNumeric column but could not find relevant event.

    Request you to guide over this.

    Thank you.

    Regards,

    Mayur

  • Posted 11 December 2017, 3:33 pm EST

    Hi,

    Please try to use SourceUpdated event after setting the NotifyOnSourceUpdated property of the binding to true:

    For more info https://msdn.microsoft.com/en-us/library/system.windows.data.binding.notifyonsourceupdated(v=vs.110).aspx

    Hope, it will help you.

    Thanks,

    Singh

  • Posted 13 December 2017, 8:01 pm EST

    Thank you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels