This is a migrated thread and some comments may be shown as answers.

[Solved] Missing border and broken header line

1 Answer 290 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marko Clemente
Top achievements
Rank 1
Marko Clemente asked on 07 Apr 2009, 09:28 AM
Hello,

  I have a problem with on-the fly generated columns in the radgrid. This radgrid is created ad design time, left empty, everything is done later in runtime. 

 Grid properties are:
ViewerTable.Width = Unit.Percentage(95);  
ViewerTable.ShowGroupPanel = false;  
ViewerTable.AutoGenerateColumns = false;  
ViewerTable.AllowPaging = false;  
ViewerTable.GroupingEnabled = true;  
ViewerTable.ClientSettings.Resizing.AllowColumnResize = true;  
ViewerTable.ClientSettings.Scrolling.AllowScroll = true

  1. I set the width for every column when created, so if there is a longer text put in it gets wraped - which is ok. The problem occurs if the sum of the columns is less than the width of the grid itself. Then at the last column, which is now a little higher due to the wraped text, "breaks" header line of the grid.
  2. The last column is missing right border line. I have read that this could happen when the cells are empty but these are not. The line is missing on the whole column border, not just (possible) empty cells.

Issues can be seen here.

I'm sure that I'm just missing something.

Thank you for your help,

 Marko.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 09 Apr 2009, 10:19 AM
Hi Marko Clemente,

Here are some tips for your issues:

1. The observed visual glitch is caused by the specifics of the RadGrid rendering and the problem is exhibited when using static headers, there is a vertical scrollbar (or the master table is shorter that the RadGrid) and the header gets higher. In your case I would recommend removing the background at the top-right corner with CSS:

.RadGrid_Office2007  .GridHeaderDiv_Office2007
{
       background: none transparent;
}


2. Normally the master table occupies 100% of the RadGrid width, so a right border is not necessary, because it would make the control's right border double. In your case you can add a right border like this:

.RadGrid_Office2007  .MasterTable_Office2007
{
       border-right: 1px solid #d9d9d9;
}


Both CSS rules from above will work for Q3 2008, which you seem to be using. For Q1 2009 the CSS selectors should read:


div.RadGrid_Office2007  .rgHeaderDiv

and

div.RadGrid_Office2007  .rgMasterTable


Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Marko Clemente
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or