For Target Deadline field I am using the In-Place editor.
But now on that Target Deadline modification field I created
one More page and tat prompted when some one modified that Target deadline.
SO, suppose the Target Deadline have bind have is 3/12/2019.
Now some one modifies the value of that field is 3/21/2019
then I will prompt the below form.
Bugs: -
But suppose User click on the cancel button then I will update
the old value in cancel button click event for Target Deadline because as of
now the latest value of the Target deadline is 3/21/2019 and user changed that
value by mistake. So, I need to set the old value for Target Deadline, but it’s
not updated the value.
But when I refresh the page it’s binds old value.
Code on Close Button Click event
private void
CloseModal()
{
TimeLineModified = false;
selectedCase.Targetdeadline =
selectedCase.Targetdeadline;
}
Method Code for prompting
the page when some-one update the value for Target Deadline
private async Task
OnTDUpdate(ActionEventArgs arg)
{
TimeLineModified = true;
}
Code on Target Deadline for in-place editor
<EjsInPlaceEditor Mode="@Mode" Type="InputType.Date" SubmitOnEnter="true" Value=" TimelineStartdate" Model="@DateData">
<InPlaceEditorEvents TValue="Client" OnActionSuccess="OnTSUpdate"></InPlaceEditorEvents>
</EjsInPlaceEditor>
Code for Page Prompt
@if (TimeLineModified)
{
<EditForm Model="@Tesy" OnSubmit=@FormSubmitted>
<DataAnnotationsValidator />
<div class="modal modal-fade" tabindex="-1" style="display:block" role="dialog">
<div class="modal-dialog modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header text-center
updateTitle">
<h3 class="modal-title w-100">Do you want to really Update Timeline?</h3>
@*<button
type="button" class="close"
@onclick="@CloseModal">
<span
aria-hidden="true">X</span>
</button>*@
</div>
<div class="modal-body">
<form>
<div class="form-group">
<MatTextField @bind-Value="@Test.Description" Label="Date Update Note" Outlined="true" TextArea="true" Style="width:100%; min-height:250px;"></MatTextField>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn
btn-lg btn-danger mr-auto" data-dismiss="modal">Update Timeline</button>
<button type="button" class="btn
btn-lg btn-warning float-right" @onclick="@CloseModal">Cancel</button>
</div>
</div>
</div>
</div>
</EditForm>
So main issue is that once the value of that component binds
on OnActionSuccess then we don’t able
to update the value for that in place editor component and that new value only
apply when we reload the page.
Hope you got my point, and
this is very basic things that every developer want because some time on other
event of form button something else they must want to update the exiting value
of this component