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

Column client resize lost on page change

7 Answers 180 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 26 Feb 2009, 11:02 PM
Hello,

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

CS

7 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Feb 2009, 05:27 AM
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.
0
CSurieux
Top achievements
Rank 2
answered on 27 Feb 2009, 08:15 AM
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
0
Sebastian
Telerik team
answered on 27 Feb 2009, 09:38 AM
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.
0
CSurieux
Top achievements
Rank 2
answered on 05 Mar 2009, 12:13 PM

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

0
Sebastian
Telerik team
answered on 05 Mar 2009, 12:22 PM
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.
0
CSurieux
Top achievements
Rank 2
answered on 05 Mar 2009, 12:25 PM
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
0
Sebastian
Telerik team
answered on 09 Mar 2009, 01:23 PM

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.
Tags
Grid
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
CSurieux
Top achievements
Rank 2
Sebastian
Telerik team
Share this question
or