Skip to content

updateAction with record no id #4

@HeB-zz

Description

@HeB-zz

Hi, congratulates for this plugin for first.

Then, I've a problem in the updateAction.
Server side, I have the record but without the id..is it normal ?

I need to receive id number of the line in the update.

here one part of my code :

$('#DIV_MouvementsContainer').jtable({
title: 'Mouvements financiers',
actions: {
listAction: '/Accueil.aspx/MouvementList',
createAction: '/Accueil.aspx/CreateMouvement',
updateAction: '/Accueil.aspx/UpdateMouvement',
deleteAction: '/Accueil.aspx/DeleteMouvement'
},
fields: {

                Id: {
                    key: true,
                    create: false,
                    edit: false,
                    list: false
                },
                Montant: {
                    title: 'Montant',
                    width: '20%'
                },
                Type: {
                    title: 'Type',
                    width: '40%'
                },
                Libelle: {
                    title: 'Libelle',
                    width: '20%'
                },
                Date: {
                    title: 'Record date',
                    width: '30%',
                    type: 'date'
                }
            }
        });

in the aspx page and

[WebMethod(EnableSession = true)]
public static object UpdateMouvement(Mouvement record)
{
try
{
string msg = record.Update();
if (msg == "")
return new { Result = "OK" };
else
return new { Result = "ERROR", Message = msg };
}
catch (Exception ex)
{
return new { Result = "ERROR", Message = ex.Message };
}
}

code behind page.

I get the record but without the id that i have to do for update.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions