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.
I have a virtual grid that in addition to getting its data from an outside source, also gets the number of column headers to display from the outside.
Basically, what I need to do is, before the grid starts calling QueryCellInfo, I need to set the number of column headers. When would be a good time to do this? Could I do it in the QueryColCount? QueryRowCount is supposed to return the number of rows, obviously, but I would also know at that point, how many column headers I would need.
I''m just concerned that setting the HeaderCount at that point might have unintended consequences. Is there another event that would be better suited for this?
ADAdministrator Syncfusion Team March 28, 2005 07:21 PM UTC
Sorry, I meant QueryRowCount in the one place where I have "QueryColCount".
ADAdministrator Syncfusion Team March 28, 2005 08:49 PM UTC
You can use QueryColCount to dynamically provide the column count just as you use QueryRowCount to provide the row count. Make sure you have call grid.ResetVolatileData after subscribing to the Query events.
Alternatively, you can set grid.ColCount = xxx before you subscribe to the Query events (and calling ResetVolatileData).
ADAdministrator Syncfusion Team March 28, 2005 09:57 PM UTC
Sorry, I guess I wasn''t clear. I guess my real question is, is there any potential for problems if I set grid.Cols.HeaderCount from the QueryRowCount event?
Pete
ADAdministrator Syncfusion Team March 28, 2005 11:42 PM UTC
Setting a header count is normally a one-time thing to do. QueryRowCount may be hit on an on going basis. You may want to put a one-time-only check in your QueryRowCount code to prevent the header code from repeatedly being set.