Column client resize lost on page change

8 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 26 Feb 2009 Link to this post

    Hello,

    RadGrid is loosing sizing set by users when paging.
    Thanks for a way to keep it until it is corrected.

    CS
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Feb 2009 Link to this post

    Hello Christian,

    Inorder to save the resize settings for a column in the Grid, you may have to hook the OnColumnResized client event, fire an ajax request from the event , pass the new width value of the column to the server side and store it using custom logic to recover the settings later. You can refer to the following forum link, which discusses on the same scenario:
    Can we save the clientSettings in RadGrid?

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 27 Feb 2009 Link to this post

    Hi Princy,

    This solution is not Ok for me: having a server call for this will be too slow, in some 'heavy loaded' situations cost to send a callback is too high.
    I am surprised that there are no way to keep something directly in grid / browser logic.

    This is on this kind of situation we realize effisciency of a tool confronted to real world.

    Need better from Telerik, yo have proved you could.

    Thanks

    CS
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 27 Feb 2009 Link to this post

    Hello Christian,

    I tried to recreate the issue on this online demo of RadGrid:

    http://demos.telerik.com/aspnet-ajax/grid/examples/client/resizing/defaultcs.aspx

    but the new column width dimensions were persisted across difference pages. Can you please verify that on your machine and confirm that you are using the latest release 2008.3.1314 of RadControls for ASP.NET AJAX in your project? Thus you should not encounter issues with colum sizes persistance.

    Best regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 05 Mar 2009 Link to this post

    Hello,
    Sorry for late answer.
    Fact is that I rebuild the grid on each call: postback or callback, this is certainly the reason why I am loosing columms size set on client side.

    My question is now: if I manage the OnColummResized I generate a callback and recrate the full grid: not very efficient and even I don't know if I could extract size before recreating grid ?

    ??

     

    CS

  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 05 Mar 2009 Link to this post

    Hello Christian,

    Under such circumstances consider the solution for column widths preservation discussed in the forum thread linked by Princy.

    Kind regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 05 Mar 2009 Link to this post

    Some little addendum:
    I am not recreating grid, I use NeedDataSource, ColumnCreated and ItemDataBound to adapt data in columns but not column size.
    I only rebuild a DataTable when NeedDataSource is called.
    I was thincking ColumnCreated was triggered each time, I will check.
    Fact is that I am in a normal usage and I am lossing size on each call back, here are my grid declaration, may be error is here ?
    <div style="width: 100%;">  
        <Telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" 
            AllowSorting="True" ShowStatusBar="true" GridLines="None" ShowGroupPanel="True" 
            Width="100%">  
            <PagerStyle Mode="NextPrevAndNumeric" /> 
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">  
                <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" /> 
                <Scrolling AllowScroll="True" ScrollHeight='400px' UseStaticHeaders="True" SaveScrollPosition="True" /> 
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
            <MasterTableView Width="100%" TableLayout='Fixed' AllowMultiColumnSorting="true">  
                <ItemStyle Wrap='false' /> 
                <HeaderStyle Width='100px' /> 
                <AlternatingItemStyle Wrap='false' /> 
            </MasterTableView> 
            <SortingSettings SortedBackColor="Azure" /> 
        </Telerik:RadGrid> 
    </div> 
     


    Thanks for support.

    CS
  9. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 09 Mar 2009 Link to this post

    Hello Christian,

    Your implementation seems correct and unfortunately I am not able to determine the exact cause of the abnormality in this particular case. To progress in our investigation, please prepare a stripped working version of your project and send it enclosed to a formal support ticket. I will test/debug it locally and will get around to you with more info on the subject.

    Best regards,

    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017