In-place Editor - OnOnActionSuccess does not work with remotely loaded database

Hi,

I am working with this example, however if loading DataManager from a remote database (Azure), OnActionSuccess does not work.

My code:

<SfInPlaceEditor CssClass="e-inplaceeditor" Mode="RenderMode.Popup"  Type="InputType.DropDownList" Value="@city" Model="DropModelCities">
         <InPlaceEditorEvents OnActionSuccess="OnSuccessCities" TValue="string"  ></InPlaceEditorEvents>
</SfInPlaceEditor>

    public class citiesTable
    {
        public int id{ get; set;}
        public int NameCity{ get; set;}
     }
      
     public string  city;
     List<citiesTable> citiesList = new List<citiesTable>();
     public static string[] DataManager;

    protected override async Task OnInitializedAsync()
    {         
           citiesList = await citiesManager.GetList("NameCity", "ASC");        
           DataManager = citiesList.Select(f => f.NameCity).ToArray();
       
    }

    public void OnSuccessCities(ActionEventArgs args)
    {
            city = args.Value;        
            ...
     }

   public SfDropDownList<string, string> DropModelCities = new SfDropDownList<string, string>()
    {
        Placeholder = "Select a city",
        ShowClearButton = false,
        DataSource = DataManager

    };




1 Reply

IS Indrajith Srinivasan Syncfusion Team June 1, 2020 08:26 AM UTC

Hi Marcelo,

Greetings from Syncfusion support,

We have validated your reported query. To bind remote data with the Inplace-editor control, assign service data as an instance of DataManager to the dataSource property. To interact with remote data source, provide the endpoint URL. It supports ODataV4Adaptor and WebApiAdaptor adaptors. We have also prepared a sample configuring these adaptors for loading the remote data.

Sample: https://www.syncfusion.com/downloads/support/forum/154754/ze/Inplace_remote_data1703138799

Please let us know if the solution helps.

Regards,
 
Indrajith 


Loader.
Up arrow icon