How can I access to edited task when I have editable cell feature turned on (celledittemplate)?

4 posts, 1 answers
  1. Bahram
    Bahram avatar
    24 posts
    Member since:
    Feb 2019

    Posted 15 Apr 2019 Link to this post

    Hi there,

    I have an issue getting customizing CellEditTemplate to work. I am trying to update the title of a task in db, so I am using GanttView_TaskEdited event to get edited task. However e.Task.Title gives me existing value instead of giving me new value that just entered by user. Any thoughts on this?

    Thanks,
    Bahram Afsharipoor
  2. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1173 posts

    Posted 18 Apr 2019 Link to this post

    Hi Bahram,

    I tried defining the following template and handling the TaskEdited event but I get the updated title via the e.Task.Title when doing so.

    <telerik:TreeColumnDefinition Header="Title" MemberBinding="{Binding Title}" Width="240">
        <telerik:TreeColumnDefinition.CellEditTemplate>
            <DataTemplate>
                <TextBox Text="{Binding Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
            </DataTemplate>
        </telerik:TreeColumnDefinition.CellEditTemplate>
    </telerik:TreeColumnDefinition>

    I've prepared a small sample project and attached it to my reply for your reference.

    Could you please have a look and let me know how this project differs from the setup you have at your end?

    I will be looking forward to your reply.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Bahram
    Bahram avatar
    24 posts
    Member since:
    Feb 2019

    Posted 21 Apr 2019 in reply to Dilyan Traykov Link to this post

    Hi Dilyan,

    It's working now! I appreciate your help, all I needed to do was adding UpdateSourceTrigger=PropertyChanged to the TextBox. I am surprised that why there is nothing about UpdateSourceTrigger on Customizing the CellEditTemplate

     

    Thanks,

    Bahram 

  4. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    1173 posts

    Posted 22 Apr 2019 Link to this post

    Hi Bahram,

    I'm happy to hear that everything is now working as expected at your end.

    I also want to thank you for your feedback regarding our documentation and let you know that we will take it into account.

    Regards,
    Dilyan Traykov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top