SmartClient

<script type="text/javascript" >
CountryDS=[{id:'1',name:'a'},{id:'2',name:'b'},{id:'3',name:'c'}];
isc.ListGrid.create({
    ID: "ListGrids",
    width:500, height:224,
    data: CountryDS,
dragDataAction:"move",
canDragRecordsOut:true, alternateRecordStyles:true,
canAcceptDroppedRecords:true,
canReorderRecords:true,
    fields:[
        {name:"id", title:"id"},
        {name:"name", title:"name"}
    ],
selectionChanged:function()
{
DynamicForms.setData(ListGrids.getSelectedRecord());
},
selectionType: "multiple",
    autoFetchData: true
})
isc.ListGrid.create({
    ID: "ListGrides",
    width:500, height:224,
dragDataAction:"move",
canDragRecordsOut:true, alternateRecordStyles:true,
canAcceptDroppedRecords:true,
    fields:[
        {name:"id", title:"id"},
        {name:"name", title:"name"}
    ]
})

isc.DynamicForm.create({
    ID: "DynamicForms",
    titleSuffix: "",
action:"www.hao.com",
    fields: [{
name:"id",
title: "id"
},{
name:"name",
title: "name"
},{
title: " Eidt ",
        width: 100,
        endRow: false,
        startRow: false,
        type: "button",
        wrapTitle: false,
        titleAlign: "left",
click:function()
{
if (!ListGrids.getSelectedRecord()) return;

var updatedRecord = isc.addProperties(
ListGrids.getSelectedRecord(),
{name:DynamicForms.getValue("name")}
); 
ListGrids.updateData(updatedRecord);
ListGrids.fetchData([]);
}
}]
});
isc.VStack.create({
    top: 35,
    height: 50,
    layoutMargin: 10,
    membersMargin: 5,
    members: [ListGrids, DynamicForms,ListGrides]
});

</script>


SmartClient一個簡單的案例..但存在著一個問題..
就是修改數據后..ListGrid的綁定沒更新..只能查找多一次還更新..
以後知道了在來修改..

你可能感兴趣的:(C++,c,C#)