Problem with GridView width

2 posts, 0 answers
  1. StevenDale
    StevenDale avatar
    100 posts
    Member since:
    Apr 2007

    Posted 20 May 2009 Link to this post

    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
  2. StevenDale
    StevenDale avatar
    100 posts
    Member since:
    Apr 2007

    Posted 20 May 2009 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top