Firing Update() Programmatically ?

3 posts, 0 answers
  1. K.Ramadan
    K.Ramadan avatar
    78 posts
    Member since:
    Feb 2020

    Posted 12 Aug Link to this post

    I have a Button(s) in the Editor, when User clicks on that Button then a Telerik Window will be opened with a Terlerik Grid (in that Window)   (SEE attached Files)
    So .. if i click on it, and choose a Row from the Grid .. and then save the selected option (SEE attached Files) and then try to save the Event (Without changing another Value) ..
    So normally if i change the selected option from any DropDownList or any Item that directly Programmed in that way :

    <div class="k-edit-label">
        <label for="Prioritaet">Priorität</label>
    <div data-container-for="Prioritaet" class="k-edit-field">
        @(Html.Kendo().DropDownListFor(model => model.Prioritaet)
                             .Events(events => events.DataBound("onDataBound_DropDownListFor_Prioritaet_KOMM"))
                             new {Prioritaet = "1 = Niedrig", PrioritaetColor = "blue"},
                             new {Prioritaet = "2 = Normal",  PrioritaetColor = "green"},
                             new {Prioritaet = "3 = Hoch",    PrioritaetColor = "red"}


    So this "data-container-for" will take care of it usually .... but not in my situation ! Because I'm selecting the Value from the Grid and Not From the Button, Exp. :

    <div class="k-edit-label">
        <label for="Recid_person">Person</label>
    <div data-container-for="Recid_person" class="k-edit-field">
            .HtmlAttributes( new {type = "button"} )
            .Content("Personen Suchen"))


    So i need that the Event Editor the Update() calls, so that i can Update only that Field (if Only one Field (Value) changed) ..


    Steps To Follow :

    1 - Editor_Buttons_Grid

    2 - Editor_Buttons_Grid_Button

    3 - Update_Speichern_X



    Thank you in advance 


    regards Karam

  2. K.Ramadan
    K.Ramadan avatar
    78 posts
    Member since:
    Feb 2020

    Posted 13 Aug in reply to K.Ramadan Link to this post


    i got this .. I saved the selected Values in a global variable and use it to change the values that i wanted to edit, then i called the dataSource.sync()
    i have to go through the whole dataSouce to find the Event that i want to Edit so if i have like thousands of Events .. it may work .. but it is surely not the best solution ..
    So this is a Workaround and Not a standard Solution .. if you have a clearer or faster Solution please let me know.

    Thanks anyway :-)

  3. Aleksandar
    Aleksandar avatar
    206 posts

    Posted 14 Aug Link to this post

    Hello Karam,

    From the provided information it is not clear how the Grid is linked to the Scheduler model.

    As you already have a custom template for editing Scheduler events what I can suggest is to try and add a hidden input field, for a property that would be part of the model for the Scheduler event. Then when the user selects an item from the Grid update the value of the hidden input. This way, when you save the event the Scheduler model will be sent back to the action method, including the selection made.

    I hope this will help you implement the desired functionality.

    Progress Telerik

Back to Top