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.
Syncfusion Feedback

Display Empty Columns

Thread ID:





20132 Oct 11,2004 12:14 PM UTC Oct 13,2004 12:50 PM UTC WinForms 4
Tags: GridControl
Zubin Tiku
Asked On October 11, 2004 12:14 PM UTC

Hi. I''m trying to create an extra, blank column at the end of a grid (used in virtual mode) so the grid fills up entire screen. So far I have set DisplayEmptyColumns to true and in QueryColWidth() I check to see if the incoming column index is greater than the number of columns I have in the grid. If it is, then I expand the column to fit the remaining area of the grid by checking against the width of the grid and the width of the number of columns. This works in all cases where the columns do not fill the entire grid, but in cases where my columns fill the grid and then some, the grid still tries to add empty display columns even though theoretically they should not be needed, and I cannot set their width to 0 because it creates an infinite loop of column addition. What steps can I take in order to achieve the effect I''m trying to get?

Zubin Tiku
Replied On October 11, 2004 12:22 PM UTC

Hi. Just to clarify the issue at hand, with the solution I am using when I find myself with extra columns when I don''t need them. Any advice on how to proceed is most welcome and thanks in advance. Zubin

Administrator [Syncfusion]
Replied On October 11, 2004 03:12 PM UTC

Here is a little sample that adds an extra column to a virtual grid so the grid always fills the withd of its clientarea. FillRightCol_3723.zip

Zubin Tiku
Replied On October 12, 2004 06:20 PM UTC

Thank you for following up so promptly. There is a slight problem that''s driving me crazy trying to figure out, though. The example does render the number of columns correctly, but the column backgrounds do not render correctly when HScrollPixel is set to true and I scroll a little to the left or right and then scroll up and down. They get offset in an apparently random way.

Administrator [Syncfusion]
Replied On October 13, 2004 12:50 PM UTC

In the sample I chnaged QueryCellInfo to return a BackColor for each cell that has a value. I then sized the sample down so there is a horizontal scrollbar, and then scrolled the sample a little horizontally, and then up and down, but could did not see what you are describing. Can you be more explicit about how to reproduce this problem in the sample? Maybe if you post a bitmap showing the problem in the sample, I will be able to see it here.


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.

Please sign in to access our forum

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

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
Live Chat Icon