Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1445
Row Editing Template used for add new row.
posted

Is there a valid example somewhere that shows using the RowEditingTemplate when adding a new row? I found one an older one, but I am so lost on the errors.

Parents
No Data
Reply
  • 860
    Offline posted

    The following code will launch the RowEditingTemplate but i have not found a way to push the added row into the main part of the grid without tabing to the end of the new row. In order words, call the RowAdding event on the server.  Have any ideas?

     

    function GetEditingCore() {
        var wdgConferenceRooms = $find('wdgConferenceRooms');
        var behaviors;
        var editCore;

        behaviors = wdgConferenceRooms.get_behaviors();
        editCore = behaviors.get_editingCore();

        return editCore;
    }
    function GetRowEditingTemplate() {
        var rowTemplate;
        var editCore;

        editCore = GetEditingCore();
        rowTemplate = editCore.get_behaviors().get_rowEditingTemplate();


        return rowTemplate;
    }

    function wdgConferenceRooms_RowAdding_EnteringEditMode(sender, eventArgs)
    {
     ///<summary>
     ///
     ///</summary>
     ///<param name="sender" type="Infragistics.Web.UI.WebDataGrid"></param>
     ///<param name="eventArgs" type="Infragistics.Web.UI.CancelEditModeEventArgs"></param>

        //Add code to handle your event here.

        var rowTemplate = GetRowEditingTemplate();
        var row = eventArgs.getCell().get_row();

        rowTemplate.enterEditMode( row );
    }

Children