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

[Solved] border Q3 2009

4 Answers 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 16 Nov 2009, 02:41 PM
Hi,
My grid width is greater than the page width.
When i scoll right using the ie scrollbar, there is a line down the grid where the edge of the page used to be, and the group panel does not extend to the full width of the grid, just the page.
This is dificult to explain, so i have attached some screen shots to show what i mean.

I have tried setting the borderstyle = none, which works , but.. i want the grid to have borders as it looks odd within a DIV with a margin of 10px. This does not solve the group panel issue though.

Attached..
1.jpg shows grid before scrolling to right.
2.jpg shows grid after scrolling to right. (highlighted issue in red)

Any ideas please ?
Thanks
Mark

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 16 Nov 2009, 04:16 PM
Hi Mark,

The observed behavior is expected and occurs due to the different way <div>s and <tables> expand.

I suggest you to set a large-enough pixel width to the RadGrid control OR float it with CSS.

<telerik:RadGrid  style="float:left"  />
<div style="clear:both"><!-- --></div>


Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mark
Top achievements
Rank 1
answered on 16 Nov 2009, 04:29 PM
Hi Dimo,
This sorted the border issue out thanks !!!
However i am still not getting the background of the group panel to fill the whole grid.

I am using the following for the group panel css...
.RadGrid_WebBlue .rgGroupPanel  
{  
    height:24px;  
    border:0;  
    border-bottom:1px solid #3d556c;  
    background:#ebf7ff !important;  

Thanks
Mark
0
Accepted
Dimo
Telerik team
answered on 18 Nov 2009, 04:32 PM
Hello Mark,

Due to the way tables and divs behave, you need to set the width of the GroupPanel with Javascript:

<telerik:RadGrid>
    <ClientSettings>
        <ClientEvents OnGridCreated="MyGridCreated" />
    </ClientSettings>
</telerik:RadGrid>


<script type="text/javascript">

function MyGridCreated(sender, args)
{
    sender._groupPanel.get_element().style.width = sender.get_masterTableView().get_element().offsetWidth + "px";
}

</script>

Sincerely yours,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mark
Top achievements
Rank 1
answered on 18 Nov 2009, 04:40 PM
Mega!
That worked many thanks

Mark
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Mark
Top achievements
Rank 1
Share this question
or