Hi,
We are using the Extjs 6.2.1.
In modern am loading the grid.
I am getting the response but the modern grid is not showingb the data in the response mode.
If i change it to IPAD then it is howing the data after this if i change to Response mode then it is showng the data,
But whne i load the grid with Response mode Modern grid not showing the data.
Here is my code.
Please help me in this.
Code:
//Grid
{
	reference: 'searchresult',
	xtype: 'da_grid',
	margin: '10 0 0 0',
	flex: 1,
	height:'100%',
	width: '100%',
	scrollable: 'y',
	bind: {
		store: '{PolicySearchStore}'
	},
	emptyText: locale.getConfigs(agentlandinglocale).EMPTY_TEXT,
	ui: 'AlertsgridUI',
	loadingText: 'Loading..',
	plugins: [
		'gridpagingtoolbar'
	],
	hideHeaders: true,
	style: 'background-color: #9ecbf2',
	columns: [{
		width: 320,
		dataIndex: 'agentPolicy',
		cell: {
			encodeHtml: false,
			style: 'background-color:#9ecbf2;',
			height: 500
		}
	}],
	listeners: {
		itemtap: 'onPolicyRowClick'
	}
}
		
	//Store
	stores: {
        PolicySearchStore: {
            model: 'AgentLanding.model.policysearch.PolicySearch',
            pageSize: AG_POLICY_SEARCH_PAGE_LIMIT,
           	proxy: {
	 	  		type: 'rest',
	 	  		timeout: 120000,
				headers: {
				  'Content-Type': "application/json",
				  'LOCALE': DigitalSuite.util.UserInfoFactory.getUserLocale()	                
				},
				reader: {
					type:'json',
					rootProperty: 'policySearch',
					totalProperty: 'count'
				}
			},
			listeners: {
				 load: 'onPolicySearchLoad',
				 beforeLoad:'beforePolicySearchLoad'
			}
        }
    }
	
	//loading	
	onPolicySearchLoad: function (me, records, successful, operation) {
        var controller = this,
            viewModel = controller.getView().getViewModel(),
            count;
        DigitalSuite.util.Util.unmask();
        if (operation.getResponse()) {
            var res = Ext.decode(operation.getResponse().responseText);
            DigitalSuite.util.Util.isOffLineAccess(res, controller);
            count = res.count;
            if (res.status == "200") {
                viewModel.set('policySearchCount', count);
                me.each(function (rec) {
                    viewModel.set('policypersistency', rec);
                });
                if (Ext.toolkit == "modern") {
                    var searchCmp = this.lookupReference('searchresult');
                    searchCmp.show();
                    if (Ext.toolkit == "modern") {
                        me.each(function (record) {
                            if (!Ext.isEmpty(record) && !Ext.isEmpty(record.data)) {
                                var planName = record.data.planName;
                                var fullName = record.data.fullName;
                                var policyNo = record.data.policyNumber;
                                var doc = DigitalSuite.util.Formatter.formatDate(record.data.doc, locale.getConfigs(constants).Global.DateFormatForServer, locale.getConfigs(constants).Global.DateFormat);
                                var term = Number(record.data.policyTerm);
                                var agencyCode = record.data.agencyCode;
                                var sumAssured = Ext.util.Format.currency(record.data.sumAssured, '₹', 0, 2);
                                var premiumAmount = Ext.util.Format.currency(record.data.premiumAmount, '₹', 0, 2);
                                var mode = Number(record.data.paymentMode);
                                var status = record.data.policyStatus;
                                var policyMode = "";
                                if (mode == 0) {
                                    policyMode = locale.getConfigs(agentlandinglocale).Single;
                                } else if (mode == 1) {
                                    policyMode = locale.getConfigs(agentlandinglocale).MLY;
                                } else if (mode == 3) {
                                    policyMode = locale.getConfigs(agentlandinglocale).QLY;
                                } else if (mode == 6) {
                                    policyMode = locale.getConfigs(agentlandinglocale).HLY;
                                } else {
                                    policyMode = locale.getConfigs(agentlandinglocale).YLY;
                                }
                                
                                record.data["agentPolicy"] = '<div class="policySearchGridCls"><span class="fa fa-bell-o fa-2x policySearchBellCls"></span><div class="policySearchLayoutCls"><p class="policySearchPlanCls">' + planName + '</p><p class="policySearchNumberCls">' + policyNo + '</p></div><p class="policySearchFieldCls">' + locale.getConfigs(agentlandinglocale).Data_Of_Commencement + '</p><p class="policySearchValueCls">' + doc + '</p><p class="policySearchFieldCls">' + 'Customer Name' + '</p><p class="policySearchValueCls">' + fullName + '</p><p class="policySearchFieldCls">' + locale.getConfigs(agentlandinglocale).TERM + '</p><p class="policySearchValueCls">' + term + " " + locale.getConfigs(agentlandinglocale).YEARS + '</p><p class="policySearchFieldCls">' + locale.getConfigs(agentlandinglocale).MODE + '</p><p class="policySearchValueCls">' + policyMode + '</p><p class="policySearchFieldCls">' + locale.getConfigs(agentlandinglocale).SUM_ASSURED + '</p><p class="policySearchValueCls">' + sumAssured + '</p><p class="policySearchFieldCls">' + locale.getConfigs(agentlandinglocale).PREMIUM + '</p><p class="policySearchValueCls">' + premiumAmount + '</p><p class="policySearchFieldCls">' + locale.getConfigs(agentlandinglocale).AGENT_CODE + '</p><p class="policySearchValueCls">' + agencyCode + '</p><p class="policySearchFieldCls">' + locale.getConfigs(agentlandinglocale).status + '</p><p class="policySearchValueCls">' + status + '</p></div>';
                            }
                        });
                        this.getView().lookupReference('searchresult').refresh();
                    }
                }
            } else {
                Ext.Msg.alert('Failure', 'No data available');
            }
        }
    },


Thanks
Kamalakar