Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

how to modify the data entered using startEditingNew ()

$
0
0
Hello,
do you have an idea how to ask the user to create a new object without specifying the ID? ie it to me to specify ID during the development!
Indeed, it is not a form, I used the startEditingNew () function
here is the code :

Code:

isc.ListGrid.create({
        ID: "AttributsList",
        width:"*", height:370,
        alternateRecordStyles:true,
        dataSource: crm_attributs,
        canReorderRecords: true,
        autodraw: false,
        selectionType :"single",
        autoFetchData: true,
        showFilterEditor: false,
        canEdit:true,
        listEndEditAction: "next",
        sortField : "crm_attr_order",
        canEdit: true,
        editEvent: "doubleClick",
        autoSaveEdits:true,
        initialCriteria: {crm_attr_fk_kind_idnum : 9999},
        fields: [
                {name:"crm_attr_fk_kind_idnum", title:"Kind", width:"50", canEdit:true,align:"left", disabled: false}
                , {name:"crm_attr_order", title:"Order" ,width:"50",showIf:"true",canEdit:true,align:"left"}
                ,{name:"crm_attr_name", title:"Name",width:"*" ,align:"left",canEdit:true}
                ,{name:"crm_attr_datatype", title:"Type" ,width:"40",showIf:"true",canEdit:true,align:"left"}
                ,{name:"crm_attr_datalist", title:"Datalist", width:"118", canEdit:true ,align:"left"}
                ,{name:"crm_attr_variable", title:"Variable", width:"118", canEdit:true,align:"left" }
                ,{name:"crm_attr_min", title:"Min", width:"40", canEdit:true ,align:"left"}
                ,{name:"crm_attr_max", title:"Max", width:"40", canEdit:true ,align:"left"}
        ],
        gridComponents:["header", "body", Attributes_EditList],
        dataChanged : function () {
                                this.Super("dataChanged", arguments);
                                var totalRows = this.data.getLength();
                                if (totalRows > 0 && this.data.lengthIsKnown()) {
                                totalsLabel.setContents(totalRows + " Attributs");
                                } else {
                                totalsLabel.setContents(" ");
        }
                                                        },
        emptyMessage: " Appuyez sur le bouton <b>'+' </b>pour ajouter un nouvel attribut  "
                                       
});


isc.ToolStrip.create({
        ID: "Attributes_EditList",
        autodraw: false,
        width: "100%", height:24,
        members: [
          isc.ToolStripButton.create({
          icon: "[SKIN]/actions/add.png",
          prompt: "add a new Kind",
          click:"AttributsList.startEditingNew()"
                                                                                        })
                                                                ]
        });


Viewing all articles
Browse latest Browse all 4756

Trending Articles