Smartclient 6.5.1
I have a listGrid that I need to bind a column to another Datasource for display values. When I implement the optionDatasource the page will not load. I recieve a JS error: "_2 is null" in the Databinding module.
In the ISC console there's no error: 09:26:25.081:INFO:Log:isc.Page is loaded.
I created another listgrid bound to the same datasource as the optiondatasource and it loads properly, so I know the DS is working correctly.
Here's the listgrid and datasources:
	
Also, just so you know, if I set autoFetchDisplayMap: false on the field, everything loads fine except there's no values in the listgrid field.
					I have a listGrid that I need to bind a column to another Datasource for display values. When I implement the optionDatasource the page will not load. I recieve a JS error: "_2 is null" in the Databinding module.
In the ISC console there's no error: 09:26:25.081:INFO:Log:isc.Page is loaded.
I created another listgrid bound to the same datasource as the optiondatasource and it loads properly, so I know the DS is working correctly.
Here's the listgrid and datasources:
Code:
	
	
isc.RestDataSource.create(
{
ID:"DSShowCategory",
dataProtocol:"postMessage",
fetchMode:"basic",
showPrompt: false,
dataFormat: "xml",
recordXPath: "//ShowCategory",
fields: [{name: "ShowCategoryID", title: "CategoryId", type:"integer", 
                primaryKey: true, canEdit: false},
         {name: "Title", title: "Title"},                   
         {name: "DivId", title: "DivId", type:"int"},
         {name: "Sort", title: "Sort", type:"int"},
         {name: "Grid", title: "Grid", type:"boolean"}
         ],
operationBindings: BindingsGeneric,
transformRequest: function (dsRequest) {
    if(dsRequest.operationType == "fetch")
    {
        if(dsRequest.data["DivId"] == null )
        {
          dsRequest.data["DivId"] = 1;  
        }
    }
    return this.Super("transformRequest", arguments);
}
});
isc.RestDataSource.create(
{
ID:"DSvuListShow",
dataProtocol:"postMessage",
showPrompt: false,
dataFormat: "xml",
recordXPath: "//vuListShow",
fields: [
    {name: "ShowID", title: "ShowID", type: "int", hidden:true, primaryKey: true, canEdit: false},         
    {name: "DivID", title: "DivID", type: "int"},
    {name: "ShowCategoryID", title: "ShowCategoryID", type: "integer"},
    {name: "Title", title: "Title"},
    {name: "DisplayTitle", title: "DisplayTitle"},
    {name: "FinalTitle", title: "FinalTitle", canEdit: false},
    {name: "Abbreviation", title: "Abbr"},    
    {name: "HDShow", title: "HD", type: "boolean"},  
    {name: "Active", title: "Active", type: "boolean"}, 
    {name: "Abridged", title: "Abridged", type: "boolean"}, 
    {name: "SlideImageUrl", title: "SlideImageUrl"},
    {name: "ShowImageUrl", title: "ShowImageUrl"},
    {name: "WebUrl", title: "WebUrl"},
    {name: "SupplierID", title: "SupplierID", type: "int"},
    {name: "GenreID", title: "GenreID", type: "int"},
    {name: "NetworkID", title: "NetworkID", type: "int"},
    {name: "Filecount", title: "Filecount", type: "int", canEdit: false}
         ],
operationBindings:[
    {operationType:"fetch",dataURL:"/admin/service/SmartClientGeneric.ashx"},
    {operationType:"add",dataURL:"/admin/service/SmartClientGeneric.ashx"},
    {operationType:"update",dataURL:"/admin/service/SmartClientGeneric.ashx"},
    {operationType:"remove",dataURL:"/admin/service/SmartClientGeneric.ashx"}
    ],
transformRequest: function (dsRequest) {
    if(dsRequest.operationType == "fetch")
    {
        if(dsRequest.data["DivID"] == null )
        {
          dsRequest.data["DivID"] = 1;  
        }
    }
    return this.Super("transformRequest", arguments);
}
    
});
var LGvuListShow = isc.ListGrid.create({
            ID:"vuListShow",
            width: 800, height: 300, alternateRecordStyles:false,
            fields: [
            {name: "ShowID", title: "ShowID", type: "int", hidden:true, primaryKey: true, canEdit: false},         
            {name: "DivID", title: "DivID", type: "int"},
            {name: "ShowCategoryID", title: "ShowCategoryID", type: "integer", 
                    optionDataSource: DSShowCategory, valueField:"ShowCategoryID", displayField:"Title"},
            {name: "Title", title:"Title"},
            {name: "DisplayTitle", title: "DisplayTitle"},
            {name: "FinalTitle", title: "FinalTitle", canEdit: false},
            {name: "Abbreviation", title: "Abbr"},    
            {name: "HDShow", title: "HD", type: "boolean"},  
            {name: "Active", title: "Active", type: "boolean"}, 
            {name: "Abridged", title: "Abridged", type: "boolean"}, 
            {name: "SlideImageUrl", title: "SlideImageUrl"},
            {name: "ShowImageUrl", title: "ShowImageUrl"},
            {name: "WebUrl", title: "WebUrl"}
            ],
            dataSource: DSvuListShow,
            showFilterEditor: true,
            drawAheadRatio: 4,
            dataPageSize: 10,
            showPrompt: false,
            canEdit:true,
            autoFetchData: false
        });
var mainVLayout = isc.VLayout.create({autoDraw: false, width:"100%", height:"100%"});
mainVLayout.members = [
LGShowCat, LGvuListShow
];
mainVLayout.draw();
vuListShow.fetchData({});
Also, just so you know, if I set autoFetchDisplayMap: false on the field, everything loads fine except there's no values in the listgrid field.
Comment