Hi All,
I have a grid with four columns, and sometimes many rows. When virtualizaton is off, it works for a smaller number of rows but is unable to render a high number of rows. The cell contents are text paragraphs.
When virtualization is enabled, it only renders the first portion, then scrolling runs to empty screen.
Thanks for help.
Razor:
@(Html.EJ().Grid<HomeController.CompareParagraph>("compareLanguages")
.Datasource((IEnumerable<object>)ViewBag.datasource)
.GridLines(GridLines.Vertical )
.Locale("hu-HU")
.AllowResizing()
.AllowResizeToFit()
.AllowTextWrap()
.IsResponsive()
.AllowScrolling()
.ScrollSettings( scroll => scroll.Height(680)..EnableVirtualization().AllowVirtualScrolling().VirtualScrollMode(VirtualScrollMode.Normal)
)
.Columns(col =>
{
col.Field("HU").Add();
col.Field("FR").Add();
col.Field("EN").Add();
col.Field("DE").Add();
}))
C#: List<CompareParagraph> compareParagraphs = new List<CompareParagraph>();
for (int row = 0; row < maxRows; row++)
compareParagraphs.Add( new CompareParagraph
{
HU = huRows > row ? hu[row] : "",
FR = frRows > row ? fr[row] : "",
EN = enRows > row ? en[row] : "",
DE = deRows > row ? de[row] : ""
} );
ViewBag.datasource = compareParagraphs;
return View();