Current filter:
                                You should refresh the page.
                                  • [DevExpress Support Team: CLONED FROM T824214: dxDataGrid - Lookup displays value only when clicked]

                                    I have a similar problem. Here is my lookup datasource function:

                                    [JavaScript]
                                    codiceDataSourceConfiguration = (options) => { if(!options.data) return []; var id=options.data.IdCommessa; return { // store: new CustomStore({ loadMode: 'processed', key: 'id', load: loadOptions => { let url = new URL(appInfo.apiUrl() + 'destinazioni/commesse/' + id); if (loadOptions !== undefined && loadOptions !== null) { let params = { s: loadOptions.searchValue }; Object.keys(params).forEach(key => url.searchParams.append(key, params[key])); } return fetch(url, appInfo.headers()) .then((response) => { if (response.status !== 200) { return response.json() .then((r) => { return Promise.reject(r) }); } return response.json(); }); }, byKey: key => { let url = new URL(appInfo.apiUrl() + 'destinazioni/sottocommesse/' + key); return fetch(url, appInfo.headers()) .then((response) => { if (response.status !== 200) { return response.json() .then((r) => { return Promise.reject(r) }); } return response.json(); }); } // }) }; }

                                    and there it's my column definition:

                                    [HTML]
                                    <Column dataField={'IdSottocommessa'} caption={'IdSottocommessa'} allowEditing={true} > <Lookup dataSource={this.codiceDataSourceConfiguration } displayExpr={'descrizione'} valueExpr={'id'}></Lookup> </Column>

                                    I am using editing mode='cell' and React. I can see the decoded value only when I click on the lookup column (as you can see in attached screenshot)
                                    What am I missing here?

                                • Artem (DevExpress Support) 12.03.2019

                                  Hi,

                                  The code looks correct and it's necessary to debug it to see what goes wrong. If DataGrid is in browse mode, it should load all available records for this column and compare them by the specified key. It looks like the load function doesn't return correct data on the first load.

                                  Do these steps to narrow down the cause of the issue:

                                  1. Obtain data in JSON format on the client side. You can use Dev.Tools->Network tab to check what data is loaded.
                                  2. Check that you loaded all values for the lookup column at this step.
                                  3. Create a simple page using your DataGrid config and assign data to the lookup.dataSource option directly to see if the problem persists.
                                  4. If the problem is still reproducible, post the example here for further examination.

                                  We look forward to your results.

                                0 Solutions

                                Creation Date Importance Sort by