AD
Administrator
Syncfusion Team
February 17, 2004 04:44 PM UTC
It looks like you have turned off all the cell borders in that column, have you?
Do you see the borders when you just display teh grid on teh screen?
PB
Philip Bishop
February 17, 2004 06:20 PM UTC
Yes I see the borders when just viewing. I just started trying to print today
AD
Administrator
Syncfusion Team
February 17, 2004 08:22 PM UTC
I tried this see this problem in this sample. It has 2 header rows, and does not seem to have a problem when I try to preview it or print it? Does it for you?
What are you doing differently? Can you modify teh sample to show the problem?
AD
Administrator
Syncfusion Team
February 17, 2004 08:23 PM UTC
Here is the sample I tried.
forum10933_5259.zip
PB
Philip Bishop
February 18, 2004 12:04 PM UTC
Clay,
I reproduced the problem in your sample. I found out what it was but dont understand the problem. What I did to get the second column was to go in to my column collection and clicked on column1 and changed the celltype to HEADER and then changed the basestyle to HEADER. When I do this in your code and comment out the following line
this.gridControl1.Cols.HeaderCount = 1
then u get what I am seeing. What i dont know is if we are going about getting a second column the right way or not. If i chaned my code to what your doing i can only guess that its going to work but I havent tried it yet. So what I was doing is wrong??? Let me know. Thanks again for the fast service. Attached is your sample which will reproduce what i was seeing.
Phil
forum10933_7362.zip
PB
Philip Bishop
February 18, 2004 12:16 PM UTC
Clay,
One other thing. When we print and I tried this on your sample we dont get column1 or the second column header to print. When we print it prints column0 then goes right to column2 and skips coulumn 1???
Philo
PB
Philip Bishop
February 18, 2004 12:16 PM UTC
Clay,
One other thing. When we print and I tried this on your sample we dont get column1 or the second column header to print. When we print it prints column0 then goes right to column2 and skips coulumn 1???
Phil
PB
Philip Bishop
February 18, 2004 12:27 PM UTC
On my last post I left out the fact that i was grabbing a selection of cells and not printing the whole grid.
AD
Administrator
Syncfusion Team
February 18, 2004 01:06 PM UTC
To add new headerrows, you need to set the HeaderCount property. And to freeze them from scrolling, you need to set the FrozenCount property.
Specifying a style.CellType = "Header" just defines how the grid will handle drawing the cell. For example, in a gridcontrol, you can set cell 5,8 to have "Header" celltype, but that will not make the cell ''behave'' like a header with respect to scrolling or handling clicks or other interactions on the cell. If you want to have additional ''header'' rows or ''header'' columns, then the proper way to do it is to set the HeaderCount property. If you do not want your new headers to scroll, then you should also set FrozenCount as well. This tells the grid to treat the columns as header columns.
I suspect the not printing of column 1 is related to this same problem. When the grid prints a page, it prints the header rows and columns, then the interior cells. If column 1 is not a header column, and it was not explicitly selected when you made your selections, it would not be printed.
So, maybe setting HeaderCount and FrozenCount will resolve these problems for you.
PB
Philip Bishop
February 18, 2004 01:52 PM UTC
Clay,
I tried that in my sample and then implented it in your sample and mine or your sample doesnt print the second column header when selecing a range. In your sample i had to add the allowselection in the print code. I will attach that and send it back now
Phil
forum10933_7915.zip
AD
Administrator
Syncfusion Team
February 18, 2004 03:50 PM UTC
This is a bug that we will have to fix.