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

In Edit mode Tab works does not save on clicking elsewhere

3 Answers 48 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pooran
Top achievements
Rank 1
Pooran asked on 05 Jan 2010, 07:09 AM
Hi,
   I am using Grid view and have a column defined as below.
  
<telerik:GridViewDataColumn UniqueName="SiteName" Header="SiteName" DataMemberBinding="{Binding SiteName, Mode=TwoWay}"  Width="120" > 
                            <telerik:GridViewDataColumn.CellTemplate> 
                                <DataTemplate> 
                                    <TextBlock Text="{Binding SiteName}" /> 
                                </DataTemplate> 
                            </telerik:GridViewDataColumn.CellTemplate> 
                            <telerik:GridViewDataColumn.CellEditTemplate> 
                                <DataTemplate> 
                                    <TextBox Text="{Binding SiteName, Mode=TwoWay}" MaxLength="20" Loaded="Editor_Loaded" /> 
                                </DataTemplate> 
                            </telerik:GridViewDataColumn.CellEditTemplate> 
                        </telerik:GridViewDataColumn> 
and in code behind I have
private void Editor_Loaded(object sender, RoutedEventArgs e)  
        {  
            Control ctrl = sender as Control;  
            if (ctrl != null)  
            {  
                ctrl.Focus();  
            }  
        } 

When I am in edit mode, I get a textbox. If I do tab the value is saved. If I click anywhere else, the value is not saved. Also, if I am in the last cell, hitting tab goes outside the control and value is not saved. I have to hit shift+tab to save the content. This dramatically alters the user's behaviour.

Is there a way to save the edited value on lost focus? I tried UpdateSourceTrigger=LostFocus too. No luck.
<TextBox Text="{Binding ProcedureName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" MaxLength="20" Loaded="Editor_Loaded" /> 

Any help would be highly appreciated.
Pooran

3 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 08 Jan 2010, 07:21 AM
Hi Pooran,

This issue is already fixed and will be available with the upcoming service pack. Sorry for the inconvenience.

Best wishes,
Nedyalko Nikolov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Greg Kreder
Top achievements
Rank 1
answered on 17 Mar 2010, 08:09 PM
Hi Nedyalko,

at moment we are not in position to get the new build that is 2009.3.1314.35.

we are still using 2009.3.1103.35.

Is there any workaround to get out of these problem. I am stop and really need some solution to move on. Please provide us some workaround.

Regards
Greg
0
Nedyalko Nikolov
Telerik team
answered on 19 Mar 2010, 02:53 PM
Hi Greg Kreder,

Could you provide me with some more info about your scenario? A sample project which I can debug on my side will be great. We have an idea how we can work around this, but we need a real application or at least CellEditTemplate definition which you are using for test.
Thank you in advance.

P.S. You have to open separate support ticket in order to be able to attach files.

Regards,
Nedyalko Nikolov
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.
Tags
GridView
Asked by
Pooran
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Greg Kreder
Top achievements
Rank 1
Share this question
or