Grid view 100% and Autoformatting columns

7 posts, 0 answers
  1. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 07 Jul 2010 Link to this post

    Hi, how do you get the gridview to take all available space when using the autogenerate columns. Also I found that it adds the extra blank column which is sorted by setting the column width to "*" however this cant be done when using autogenerate.

    Thanks
    P
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 08 Jul 2010 Link to this post

    Hello madladuk,

    Generally columns generation is not related to this. The grid will take all available space without need to set any properties. Can you provide more info about your scenario? Screenshot will be appreciated as well.  

    Best wishes,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 09 Jul 2010 Link to this post

    Screen shot attached. As you can see the grid does not fit the full width of the tile and you have an extra column on the right hand side.

     

     

     

    <Grid x:Name="LayoutRoot" HorizontalAlignment="Stretch">

     

     

     

     

    <Grid.RowDefinitions>

     

     

     

     

    <RowDefinition Height="*" />

     

     

     

     

    <RowDefinition Height="Auto" />

     

     

     

     

    </Grid.RowDefinitions>

     

     

     

     

    <telerik:RadGridView x:Name="radGridView1" AutoGenerateColumns="True" Margin="5" Grid.Row="1" HorizontalAlignment="Stretch"

     

     

     

    />

     

     

     

     

    <TextBlock Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Center"

     

     

     

    Foreground="Black" FontFamily="Arial" Margin="5" x:Name="tbTitle" >

     

     

     

     

     

    </TextBlock>

     

     

     

     

    </Grid>

     

  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Jul 2010 Link to this post

    Hello madladuk,

     Actually this is not extra column - just rows measured to the end of the grid. You can remove this if you set ColumnWidth="*" for the grid or set Width="*" for the last grid column. To access auto-generated columns you can use AutoGeneratingColumn event. 

    All the best,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 12 Jul 2010 Link to this post

    Thanks, well this will sort out the columns in the gird however the main problem is the gridview filling the full width of the grid. Can you give me some pointers.
  7. madladuk
    madladuk avatar
    126 posts
    Member since:
    Dec 2009

    Posted 12 Jul 2010 Link to this post

    Okay sorted it, my main grid did not have the alignments setup as "stretch"

    Thanks
    P
  8. Kaushal
    Kaushal avatar
    47 posts
    Member since:
    Sep 2010

    Posted 18 Jul 2012 Link to this post

    Hi madladuk,

    I am facing issue to stretch last column till grid width so if you have proper implemented answer then please share over here.
    Thanking you,

    Kaushal Jani
Back to Top
DevCraft banner