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

Problem with GridView width

1 Answer 79 Views
GridView
This is a migrated thread and some comments may be shown as answers.
StevenDale
Top achievements
Rank 2
StevenDale asked on 20 May 2009, 04:06 PM
I have a RadGridView on a page defined as :

 

 

<Grid Height="115">

 

 

 

<telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding PatientMedications}">

 

 

 

<telerik:RadGridView.Columns>

 

 

 

<telerik:GridViewDataColumn Width="2*" HeaderText="Name" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Drug_.Name}" UniqueName="{x:Null}"/>

 

 

 

<telerik:GridViewDataColumn Width="3*" HeaderText="Dosage" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Dosage}" UniqueName="{x:Null}" />

 

 

 

<telerik:GridViewDataColumn Width="85" HeaderText="Started" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=StartTime}" UniqueName="{x:Null}" />

 

 

 

<telerik:GridViewDataColumn Width="85" HeaderText="Ended" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=EndTime}" UniqueName="{x:Null}" />

 

 

 

<telerik:GridViewDataColumn Width="*" HeaderText="Comments" DataType="{x:Type System:String}" DataMemberBinding="{Binding Path=Comments}" UniqueName="{x:Null}" />

 

 

 

</telerik:RadGridView.Columns>

 

 

 

</telerik:RadGridView>

 

 

 

</Grid>

 


My problem is that it is forcing the with of its bounding container to expand instead of its own size being set by the container.  I want the grid to expand to the full size of its bounding container.

What do I need to do to accomplish this?

Thanks,

Billy Jacobs

1 Answer, 1 is accepted

Sort by
0
StevenDale
Top achievements
Rank 2
answered on 20 May 2009, 04:10 PM
I figured it out. I had it in a ScrollViewer which had both horizontal and vertical scrolling on. Once I removed the horizontal scrolling the problem was resolved.

Thanks,

Billy Jacobs
Tags
GridView
Asked by
StevenDale
Top achievements
Rank 2
Answers by
StevenDale
Top achievements
Rank 2
Share this question
or