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
1000
Fill igCombo in grid with oData and setup lookup function
posted

Hello,

I am using a combobox within an igGrid and implemented everything according to the following forum post:

http://www.infragistics.com/community/forums/p/72892/370474.aspx

The only difference is that I am using oData and not local data.

I can fill the combobox and edit the values in the grid.

However, I am unable to fill the lookup array for the formatter function.

Here I setup my lookup data source: (TypeScript)

        var mediasSchema = new Infragistics.DataSchema("json", {
            fields: [
                { name: "ID", type: "number" },
                { name: "Name", type: "string" }
            ],
            searchField: "value"
        });
        this.medias = new Infragistics.RemoteDataSource({
            autoCommit: true,
            responseDataKey: "value",
            responseDataType: "json",
            responseContentType: "application/json; charset=utf-8",
            dataSource: host + 'odata/Medias?$select=ID,Name',
            schema: mediasSchema,
            dataBound: () => this.fillMediaNameLookup(this._lookupMediaList)
        });

And then I call:

        (<any>this.medias).dataBind();

By the way, the TypeScript declaration of dataBind is not correct in Infragistic's ".d.ts" file. That's why I have to do the casting.

I use the dataBound event to fill the lookup array.

Unfortunately, the data source is still empty when the dataBound event is raised.

I can see in the browser's debugging tools that the dataBound event is called even before the JSON is returned and processed.

Is this a bug?

If yes, I would need a fix asap. If not, can you modify the sample from the forum post that I mentioned above so that it works with oData. (Both, the table data and the lookup data comes from an oData source.)

Thanks!

Joern