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

Layout Save/Load does not work in Q1 2009

15 Answers 172 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phil
Top achievements
Rank 1
Phil asked on 17 Mar 2009, 12:08 AM

I previously had Q3 2008 installed updated to Q1 2009 and now the save/load layout do not work. Actually the save works and creates the layout file but the load has no effect. Work fine before the update. Also noticed the demo only has a Save button, no Load button....

 

Can someone confirm that the load layout is broken or if I need to keep diggin..

15 Answers, 1 is accepted

Sort by
0
Phil
Top achievements
Rank 1
answered on 17 Mar 2009, 12:30 AM
After further investigation, its the column ordering that is not working.

For example if I have original order #, Date, Time  and re-order the columns to #, Time, Date, save the layout, close the form, open the form and load the layout,  the order is the same as the original #, Date, Time.  I looked a the layout.xml file and the order in the file is #, Time, Date.

0
Nick
Telerik team
answered on 19 Mar 2009, 04:00 PM
Hi Phil,

Thank you for reporting this issue. We are aware of it and we will address it as soon as possible. I have updated your Telerik points for bringing this matter to our attention. Do not hesitate to write me back if you have further questions.

Regards,
Nick
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
runningnet
Top achievements
Rank 1
answered on 25 Mar 2009, 07:17 PM
I also have reproduced this problem.  Is there a fix yet?

Dave
0
Nick
Telerik team
answered on 30 Mar 2009, 09:11 AM
Hi runningnet,

Thank you for contacting us. The issue is addressed for Q1 2009 SP1 which is expected within a month. The same applies to Load button in our Demo application.

Sincerely yours,
Nick
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Ben
Top achievements
Rank 1
answered on 07 Apr 2009, 10:28 PM
Hi - I too have noticed something a bit odd when loading layouts. If a user *groups* a colum in a grid and saves the layout, when the layout is loaded the grouping isn't visible - however right-clicking on the column shows the 'Ungroup' option. I.e. the grid seems to think the column is grouped but it is not being displayed as such.

Is this related to the issue reported by the original poster - or is this something else?
0
Nick
Telerik team
answered on 08 Apr 2009, 01:48 PM
Hi Ben,

Thank you for your question; that is something else and I cannot reproduce it. Can you send us the steps you need to perform in our Demo Application --> Grid --> Save/Load Layout example? Thank you very much in advance.

Sincerely yours,
Nick
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Ben
Top achievements
Rank 1
answered on 14 Apr 2009, 04:55 AM
Sorry for the delay in replying - I was pulled off that task and onto another temporarily.

I have had a look at the demo load/save grid layout application and after fixing the "Load" button (i.e. making it visible) I was able to get the grid to save and load column groupings without any problems.

Here is the XML layout code generated by the demo..

<RadGridView Text="radGridView1" GroupExpandAnimationType="Slide" ThemeName="Breeze" BackColor="236, 251, 254" Cursor="Arrow" ForeColor="Black" Name="radGridView1" TabIndex="1"
    <MasterGridViewTemplate Caption="" ShowGroupedColumns="True" AllowAddNewRow="False" EnableFiltering="True" AutoExpandGroups="True" AutoGenerateColumns="False"
        <SummaryRowGroupHeaders> 
            <Telerik.WinControls.UI.GridViewSummaryRowItem> 
                <Telerik.WinControls.UI.GridViewSummaryItem Aggregate="First" FieldName="City" FormatString="City: {0};" /> 
            </Telerik.WinControls.UI.GridViewSummaryRowItem> 
        </SummaryRowGroupHeaders> 
        <GroupByExpressions> 
            <Telerik.WinControls.UI.GridGroupByExpression> 
                <SelectFields> 
                    <Telerik.WinControls.UI.GridGroupByField HeaderText="City" FieldName="City" FieldAlias="City" /> 
                </SelectFields> 
                <GroupByFields> 
                    <Telerik.WinControls.UI.GridGroupByField HeaderText="City" FieldName="City" FieldAlias="City" /> 
                </GroupByFields> 
            </Telerik.WinControls.UI.GridGroupByExpression> 
        </GroupByExpressions> 
        <Columns> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="CustomerID" FieldAlias="CustomerID" UniqueName="CustomerID" VisibleInColumnChooser="False" Width="241" HeaderText="CustomerID" HeaderTextAlignment="MiddleLeft" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="CompanyName" FieldAlias="CompanyName" AllowGroup="False" UniqueName="CompanyName" Width="289" HeaderText="CompanyName" HeaderTextAlignment="MiddleLeft" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Country" FieldAlias="Country" UniqueName="Country" Width="241" HeaderText="Country" HeaderTextAlignment="MiddleLeft" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="City" FieldAlias="City" SortOrder="Ascending" UniqueName="City" Width="241" HeaderText="City" HeaderTextAlignment="MiddleLeft" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="ContactName" FieldAlias="ContactName" UniqueName="ContactName" Width="289" HeaderText="ContactName" HeaderTextAlignment="MiddleLeft" /> 
        </Columns> 
    </MasterGridViewTemplate> 
    <RootElement ForeColor="Black" /> 
</RadGridView> 
 
 

And here is the XML code generated for my grid (obviously with different columns). Is there anything in there that you can see that would be stopping the grouping from being restored when I call LoadLayout()?

<RadGridView ReadOnly="True" ShowGroupPanel="False" EnableHotTracking="False" ThemeName="TradeFlowTheme" BackColor="ControlDark" Cursor="Default" Font="Tahoma, 8.25pt" ForeColor="ControlText" Name="grPositions" RightToLeft="No" TabIndex="2" ImeMode="NoControl"
    <MasterGridViewTemplate AllowRowResize="False" AllowCellContextMenu="False" ShowGroupedColumns="True" ShowRowHeaderColumn="False" ShowFilteringRow="False" AllowAddNewRow="False" AllowEditRow="False" AllowDeleteRow="False"
        <SummaryRowGroupHeaders> 
            <Telerik.WinControls.UI.GridViewSummaryRowItem> 
                <Telerik.WinControls.UI.GridViewSummaryItem Aggregate="First" FieldName="PosSide" FormatString="Direction: {0};" /> 
            </Telerik.WinControls.UI.GridViewSummaryRowItem> 
        </SummaryRowGroupHeaders> 
        <GroupByExpressions> 
            <Telerik.WinControls.UI.GridGroupByExpression> 
                <SelectFields> 
                    <Telerik.WinControls.UI.GridGroupByField HeaderText="Direction" FieldName="PosSide" FieldAlias="Direction" /> 
                </SelectFields> 
                <GroupByFields> 
                    <Telerik.WinControls.UI.GridGroupByField HeaderText="Direction" FieldName="PosSide" FieldAlias="Direction" /> 
                </GroupByFields> 
            </Telerik.WinControls.UI.GridGroupByExpression> 
        </GroupByExpressions> 
        <Columns> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Instrument.InsName" FieldAlias="Instrument.InsName" SortOrder="Ascending" UniqueName="Instrument.InsName" Width="168" HeaderText="Name" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Instrument.InsBloombergId" FieldAlias="Instrument.InsBloombergId" UniqueName="Instrument.InsBloombergId" Width="77" HeaderText="Id" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Instrument.Currency.CurIsoCd" FieldAlias="Instrument.Currency.CurIsoCd" UniqueName="Instrument.Currency.CurIsoCd" HeaderText="Ccy" IsVisible="False" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="PosSide" FieldAlias="PosSide" SortOrder="Ascending" UniqueName="PosSide" Width="51" HeaderText="Direction" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Quantity" FieldAlias="Quantity" UniqueName="Quantity" Width="49" HeaderText="Quantity" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Pending" FieldAlias="Pending" UniqueName="Pending" Width="46" HeaderText="Pending" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Cost" FieldAlias="Cost" UniqueName="Cost" Width="49" HeaderText="Cost" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="Stop" FieldAlias="Stop" UniqueName="Stop" Width="61" HeaderText="Trade Stop" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="ClosedPnL" FieldAlias="ClosedPnL" UniqueName="ClosedPnL" Width="59" HeaderText="Profit/Loss" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T1Price" FieldAlias="T1Price" UniqueName="T1Price" Width="51" HeaderText="T1 Price" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T1Qty" FieldAlias="T1Qty" UniqueName="T1Qty" Width="40" HeaderText="T1 Qty" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T2Price" FieldAlias="T2Price" UniqueName="T2Price" Width="47" HeaderText="T2 Price" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T2Qty" FieldAlias="T2Qty" UniqueName="T2Qty" Width="40" HeaderText="T2 Qty" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T3Price" FieldAlias="T3Price" UniqueName="T3Price" Width="47" HeaderText="T3 Price" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T3Qty" FieldAlias="T3Qty" UniqueName="T3Qty" HeaderText="T3 Qty" IsVisible="False" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T4Price" FieldAlias="T4Price" UniqueName="T4Price" Width="47" HeaderText="T4 Price" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="T4Qty" FieldAlias="T4Qty" UniqueName="T4Qty" HeaderText="T4 Qty" IsVisible="False" TextAlignment="MiddleRight" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="LastTrade" FieldAlias="LastTrade" UniqueName="LastTrade" Width="117" HeaderText="Last Trade" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="HasPending" FieldAlias="HasPending" UniqueName="HasPending" VisibleInColumnChooser="False" HeaderText="Has Pending" IsVisible="False" /> 
            <Telerik.WinControls.UI.GridViewTextBoxColumn FieldName="HasAlert" FieldAlias="HasAlert" UniqueName="HasAlert" VisibleInColumnChooser="False" HeaderText="Has Alert" IsVisible="False" /> 
        </Columns> 
    </MasterGridViewTemplate> 
</RadGridView> 
 
 

Any help would be greatly appreciated!

Regards,
Ben
0
Ben
Top achievements
Rank 1
answered on 14 Apr 2009, 09:21 PM
Hi Nick,

Thanks for your response. I am sorry but I obviously didn't make myself all that clear. I do want to save and re-load the grid groupings. This works in the demo but not in my app and I was wondering if there is some grid property that I have set that is preventing this from working. In my previous post you can see exactly what is getting saved for my grid layout - is there anything in there that would preclude the column groupings from loading correctly?

Thanks again,
Ben
0
Nick
Telerik team
answered on 15 Apr 2009, 03:36 PM
Hello Ben,

Thank you for contacting us. You can do the reverse - instead of trying to skip the loading of the grouping you can avoid its saving; you need the following code to prevent the grouping from being saved in the xml file:

 
string fileName = "layout.xml";  
            SaveFileDialog dialog = new SaveFileDialog();  
            dialog.Filter =  
               "xml files (*.xml)|*.xml|All files (*.*)|*.*";  
            dialog.Title = "Select a xml file";  
            if (dialog.ShowDialog() == DialogResult.OK)  
            {  
                fileName = dialog.FileName;  
            }  
 
 
           grid.XmlSerializationInfo.SerializationMetadata.Add( 
                    typeof(DataAccessComponent), 
                    "GroupByExpressions"
                    DesignerSerializationVisibilityAttribute.Hidden 
                    ); 
 
grid.SaveLayout(fileName);    

The code above excludes grouping from serialization by adding it to the SerializationMetadata collection. I hope this helps.

Please note that currently we cannot provide the functionality of preventing loading if grouping has been serialized. In other words, you can control serialization process but you cannot control the deserialization process.

Do not hesitate to write me back if you have further questions.

Greetings,
Nick
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Ben
Top achievements
Rank 1
answered on 15 Apr 2009, 09:27 PM
Hi Nick,

I understand what you are saying about preventing the grouping from being saved by altering the serialisation metadata, however I actually do want the grouping to be saved, and subsequently reloaded. 

This works in the demo application - if you group a column and save the layout, and then reload, the grouping is restored. I want this to work in my application - I don't want to ignore any column groupings when saving the layout.

Therefore I was hoping you could see if there are some grid properties I have configured (from my layout XML I attached in an earlier post) that maybe preventing the grouping (which is being successfully saved) from being restored. Or if there is any other reason why the column groupings are not being restored.

I am pretty sure this used to work in the previous version of the GridView (i.e. Q3 2008) - in fact I am almost certain I tried this and it was functioning as expected. I recently upgraded to Q1 2009 and I believe it is since this upgrade that it no longer works - although I cannot be 100% certain.

Sorry for the confusion!

Regards,
Ben
0
Nick
Telerik team
answered on 17 Apr 2009, 04:06 PM
Hello Ben,

Sorry for the misunderstanding. Please send us a sample application demonstrating a scenario where grouping is not properly persisted. In general, the save functionality works as follows: everything is persisted excluding certain properties for which it is undesirable to be persisted. There could be some issues we are not aware of and we will be happy to investigate and address them. Please note that you need to start a new support ticket so that you can attach files.

All the best,
Nick
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
Dragoljub
Top achievements
Rank 1
answered on 20 Apr 2009, 12:16 PM
I also noticed it in some way.
The command grid.Columns.Insert(index, column) seems to ignore the index parameter, and adds the column at the end.
0
Nick
Telerik team
answered on 22 Apr 2009, 04:38 PM
Hi Dragoljub,

Thank you for feedback. Can you send us a sample project reproducing the issue? You can do so in a new support ticket - it will help us in locating the problem.

Thank you very much in advance.

Best wishes,
Nick
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
Ben
Top achievements
Rank 1
answered on 03 Jun 2009, 01:45 AM
Nick,

I have done some more investigation into this bug and have found out a bit more about it.

1. If I have no sorting defined for any columns, and add a group by for a given column, saving and reloading the layout works.
2. If I add sorting to a column which is AFTER the grouped column, saving and reloading the layout works.
3. If I add sorting to the actual grouped column, saving and reloading the layout works.
3. If I add sorting to a column BEFORE the grouped column, saving and reloading the layout DOESN'T work - i.e. the grouping is not shown (although the column thinks it is grouped since the 'Ungroup' option is available in the context menu).

I tried reproducing this in the demo application (GridView --> Saving/Loading layouts) but couldn't get it to behave the same way. However I thought this new information (re. the sorting) might help you in diagnosing the error.

Since I have now purchased a license, can we move this request to a support ticket?

Regards,
Ben


0
Nick
Telerik team
answered on 05 Jun 2009, 09:29 AM
Hello Ben,

Thank you for contacting us and the provided additional details. If you manage to find a sequence that always reproduces the problem, please share it with us.

There are other people in this thread so I cannot change it to support ticket but you can open a new support ticket about that if you want. Please refer to this forum thread in it.

Kind regards,
Nick
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
GridView
Asked by
Phil
Top achievements
Rank 1
Answers by
Phil
Top achievements
Rank 1
Nick
Telerik team
runningnet
Top achievements
Rank 1
Ben
Top achievements
Rank 1
Dragoljub
Top achievements
Rank 1
Share this question
or