Hello.
I have a dropdownlist for Contact Name in a kendo grid as shown in the attachment.
When I click on the Manage Contacts button, I get a pop up which has a grid where I insert contacts.
After inserting/updating contacts and closing the popup, the Contact Name dropdownlist should display the new contacts which have just been inserted when I click on Edit for that particular row.
But this not happening.
The code for the Contact Name editor template is as follows:
@(Html.Kendo().DropDownList()
.Name("ContactName")
.ValuePrimitive(true)
.DataValueField("ContactName")
.DataTextField("ContactName")
.OptionLabel(" ")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetVendorContacts", "VendorCont")
.Data("filterContactName");
})
.ServerFiltering(true);
})
//.AutoBind(false)
.CascadeFrom("Vendor")
)
Is there a way to refresh the dropdown list when I click on the Edit button on the row or when I click on the dropdown list to select contacts?
I have tried to refresh the dropdownlist using the BeforeEdit and Save events, but it did not work.
This is very urgent and any help will be greatly appreciated.
Thanks and Regards
I have a dropdownlist for Contact Name in a kendo grid as shown in the attachment.
When I click on the Manage Contacts button, I get a pop up which has a grid where I insert contacts.
After inserting/updating contacts and closing the popup, the Contact Name dropdownlist should display the new contacts which have just been inserted when I click on Edit for that particular row.
But this not happening.
The code for the Contact Name editor template is as follows:
@(Html.Kendo().DropDownList()
.Name("ContactName")
.ValuePrimitive(true)
.DataValueField("ContactName")
.DataTextField("ContactName")
.OptionLabel(" ")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetVendorContacts", "VendorCont")
.Data("filterContactName");
})
.ServerFiltering(true);
})
//.AutoBind(false)
.CascadeFrom("Vendor")
)
Is there a way to refresh the dropdown list when I click on the Edit button on the row or when I click on the dropdown list to select contacts?
I have tried to refresh the dropdownlist using the BeforeEdit and Save events, but it did not work.
This is very urgent and any help will be greatly appreciated.
Thanks and Regards