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?
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.
ADAdministrator Syncfusion Team 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.
ZTZubin TikuOctober 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.
ADAdministrator Syncfusion Team 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.