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

Aagghh - what have you done to the GridView between v1304 and v1314?

1 Answer 46 Views
GridView
This is a migrated thread and some comments may be shown as answers.
jholt
Top achievements
Rank 1
jholt asked on 16 Jan 2011, 10:17 AM
The following code works perfectly in version 1304 and previous builds

<telerik:GridViewDataColumn DataMemberBinding="{Binding Period}" Header="Period">
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding PeriodFormatted}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                    <telerik:GridViewColumn.CellEditTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Path=PeriodFormatted, Mode=TwoWay}" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

where in the viewmodel Period is a simple DateTime property and PeriodFormatted is a specially formatted string representation of the Period.

public string PeriodFormatted
       {
           get { return Period.PeriodToString(); }
           set
           {
               Period = value.StringToPeriod(ContractHeader.Date);
               SendPropertyChanged("PeriodFormatted");
           }
       }

Up to v.1304 when adding a new row, the value supplied by the GridView to the textbox in the cell edit template is a string value, but in v1314 the value supplied to the textbox is a DateTime value. When editing an existing row, the value supplied to the textbox is a string value.

I have had to revert to version 1304, since this new behaviour has completely broken my entire application!

You guys also made a change a few versions ago to the behaviour of the Enter key in the GridView. The form has a button set to IsDefault=true. Up until a few versions ago (I can't remember exactly which), pressing Enter in the GridView would commit the edit and pressing Enter again would be consumed by the button on the form. In the latest versions, pressing Enter in the GridView is no longer consumed by the grid, but by the form button.

So instead of comitting the line details with Enter, the form re-loads the original data! I have worked around this simply by removing the IsDefault=true from the form button, but it now needs the user to select the button with the mouse.

Is there any way to get back to the previous behaviour?

I think your products are marvellous and I use a number of your controls extensively throughout my projects. However, it is VERY frustrating when you break behaviour from previous builds - and the readme does not clearly state what has broken.

Regards
Jeremy

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 17 Jan 2011, 11:20 AM
Hi jholt,

I cannot reproduce the described issue (type of the value supplied to the textbox), maybe I'm doing something wrong. Could you take a look at my test project and let me know what I have to do in order to simulate the problem?

Could you please send me a sample project that demonstrates the problem related to Enter key? (You have to open a separate support ticket in order to do that).

Regards,
Nedyalko Nikolov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
jholt
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or