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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

How to make Grid Responsive on DOM layout changes?

Platform: jQuery |
Control: ejGrid
Tags: grid, responsive

This Knowledge base explains how to make grid responsive on DOM layout changes.

Solution:

By default, the grid act responsive based on the browser layout changes not on the DOM layout changes. To make grid responsive on DOM layout changes, we can use the windowonresize method of ejGrid.

For example, we have placed the Grid inside the Splitter control and in the resize event of the Splitter control we have called windowonresize method to make the grid responsive.

The following code example explains that how the grid act responsive when the grid inside the splitter control.

Example:

1.Render the Grid control.

HTML

JavaScript

MVC

C#

 

ASPX

 

C#

 

ASP.NET CORE

 

C#

 

2. In the resize event of the Splitter control we have called the windowonresize method to make the grid responsive.

JS

 

 

Angular

HTML

 

TS

 

 

Result:

 

Figure 1.Initial rendering of Grid inside splitter

 

Figure 2.After resizing the splitter

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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