Resize row height?

10 posts, 0 answers
  1. Geoff Marsh
    Geoff Marsh avatar
    1 posts
    Member since:
    May 2006

    Posted 20 Jul 2010 Link to this post

    Hi,

    How can I enable the end user to be able to resize row heights?

    Thanks,
    Geoff.
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 20 Jul 2010 Link to this post

    Hello Geoff Marsh,

    Do you have in mind dynamic (runtime) row resize of simply the ability to change the height of the rows before the grid is loaded? If you are dealing with the latter case you can use the RowHeight property of RadGridView. Unfortunately the first case is not recommended since it can interfere with our virtualization mechanism.


    Kind regards,
    Milan
    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. Brian
    Brian avatar
    23 posts
    Member since:
    Mar 2011

    Posted 16 May 2011 Link to this post

    Hello
      How do i allow user to resize the rows? The user should be able to resize the row just like he can do with the columns. 
    Please let me know.
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 17 May 2011 Link to this post

    Hello,

     Runtime rows resizing is not supported currently. Indeed we have plans to provide this however we cannot commit to any specific date. 

    Greetings,
    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. Maulik Patel
    Maulik Patel avatar
    36 posts
    Member since:
    Mar 2010

    Posted 02 Nov 2011 Link to this post

    Hello Vlad,

    Is the feature (of Resizing the Row of GridView runtime by user) supported in recent release?

    Regards,
    Maulik
  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 02 Nov 2011 Link to this post

    Hi,

     Indeed this feature will be available official with our Q3 2011 (middle of November). You can check our Q3 2011 Beta demo for more info:
    http://demos.telerik.com/silverlight/beta/#GridView/RowResizing

    Best wishes,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. Maulik Patel
    Maulik Patel avatar
    36 posts
    Member since:
    Mar 2010

    Posted 02 Nov 2011 Link to this post

    Thanks for the instant turn around. The feature looks cool. A quick question, is there any event/way where we can get the new size of the row (after resized)?

    Thanks,
    Maulik
  9. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 07 Nov 2011 Link to this post

    Hi Maulik,

     Indeed you will be able to handle both RowResizing (can be canceled) and RowResized for the official release next week.

    Regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  10. Maulik Patel
    Maulik Patel avatar
    36 posts
    Member since:
    Mar 2010

    Posted 02 Dec 2011 Link to this post

    Hi Vlad,

    Thanks for the information. I have used the events that you mentioned and I can see it is helpful. But I need something different also. When a user resizes any row, I want to change the size of all rows based on the last resized height (so all rows in grid have similar height). For that, I am setting up "RowHeight" property of RadGridView in RowResized event handler. This works fine (all rows are updated with the same resize height).

    Now the problem is, once the RowHeight is set (for example, it is set to 100), I cannot decrease the size of row (it is not allowing me to reduce the height less than 100). It looks like, it internally sets the minimum height of the row. Whereas I want the functionality of allwoing user to change the size (either increase or decrease at any time). Is there any way to achieve it?

    One more thing, the last row of the grid is not letting us to increase the height. Is it something expected behavior or something wrong with my code?

    Regards,
    Maulik 
  11. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 07 Dec 2011 Link to this post

    Hi Maulik,

     You are right about the last row - we will look on how to improve this in the future versions. I'm afraid however that your first requirement is not possible currently. Generally it will be better to use implicit style to achieve your goal however even this will be very fragile and slow since all rows should be invalidated - still here is an example:

    XAML

    <telerik:RadGridView CanUserResizeRows="True"
       ItemsSource="{Binding View}"
       RowResizing="RadGridView1_RowResizing"/>

    C#
    private void RadGridView1_RowResizing(object sender, Telerik.Windows.Controls.GridView.RowResizingEventArgs e)
    {
        var grid = ((RadGridView)sender);
     
        grid.Resources.Clear();
     
        var s = new Style(typeof(GridViewRow));
        s.Setters.Add(new Setter(GridViewRow.HeightProperty, e.Height));
     
        grid.Resources.Add(typeof(GridViewRow), s);
    }
     

    Greetings,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner