The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I am using a virtual grid and I need to be able to show the correct columns when there is no data found. The columns are being created dynamically when there is data, so how do I create them when there isn''t data?
Many thanks.
Ben Hinton
ADAdministrator Syncfusion Team June 23, 2005 04:26 PM UTC
If you are handling QueryColCount and QueryRowCount, the grid will use whatever values you set in e.Size.
So, when you want an empty grid, set a flag. In QueryColCount and QueryRowCount, when your flag is set, return the values you want to see. Also, in QueryCellInfo, if the flag is set, skip the normal code that you use there to access your data. Also, in SaveCellInfo, if the flag is set, just set e.Handled = true and return.
So, then you can make the grid show empty, by setting your flag, and calling grid.Refresh.