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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When to set column headers

Thread ID:

Created:

Updated:

Platform:

Replies:

26600 Mar 28,2005 07:20 PM UTC Mar 28,2005 11:42 PM UTC WinForms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On March 28, 2005 07:20 PM UTC

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?

Administrator [Syncfusion]
Replied On March 28, 2005 07:21 PM UTC

Sorry, I meant QueryRowCount in the one place where I have "QueryColCount".

Administrator [Syncfusion]
Replied On 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).

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On 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.

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.

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

;