We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When datasource is changed skip of the previous state remains and doesn't get reset

Thread ID:

Created:

Updated:

Platform:

Replies:

143886 Apr 9,2019 09:40 AM UTC Apr 10,2019 04:17 PM UTC ASP.NET Core - EJ 2 1
loading
Tags: DataGrid
John Stephen Mangam
Asked On April 9, 2019 09:40 AM UTC

Hi,

When datasource is changed skip of the previous state remains and doesn't get reset.

Thanks,
John

Hariharan J V [Syncfusion]
Replied On April 10, 2019 04:17 PM UTC

Hi John, 

Query: When datasource is changed skip of the previous state remains and doesn't get reset. 
 
By default, when dynamically assign data source it automatically refresh the Grid. If the dynamic data source does not contain the same field (initial data then it show blank row) then we suggest you to define the column property before changing the data source as follows. 

Please check the below code example for more information. 

// dynamically apply data source for Grid 
var grid = document.getElementsByClassName("e-grid")[0].ej2_instances[0]; 
// you can either define the column as below or put [] so it considered as auto generated column 
 
grid.columns=[{field:'OrderID1'}]; 
grid.dataSource = data2; 



Regards, 
Hariharan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon