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

Regarding GridViewCell Value binding.

2 Answers 219 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sushil
Top achievements
Rank 1
Sushil asked on 22 Apr 2010, 10:33 PM
I have the following DataTemplate:
<DataTemplate x:Name="DatePickerCellTemplate" x:Key="DatePickerCellTemplate"
            <telerik:RadDatePicker SelectedDate="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:GridViewCell}},Path=Value, Mode=TwoWay}" /> 
        </DataTemplate> 
that I set to a CellTemplate of a GridViewDataColumn dynamically. I  also have the DataMemberBinding of the column set to a property ( MyDate) of some object. The MyDate property binding (TwoWay) is done at runtime in the code behind. 

I am able to get the value of MyDate appear in the RadDatePicker. But it is not working the other way round, i.e. the changes are propogated back to the MyDate property.

Am i missing something ?

2 Answers, 1 is accepted

Sort by
0
Sushil
Top achievements
Rank 1
answered on 24 Apr 2010, 05:10 AM
Hello Admins / Members,

Any help is really appreciated !!

Thanks,
Sushil 
0
Accepted
Tsvyatko
Telerik team
answered on 26 Apr 2010, 12:31 PM
Hello Sushil,

Despite the CellEditTemplate, cell template is designed to display data,rather than updating it.

However I can suggest you alternative approach that will validate and update data and will improve performance at the same time (reducing the number of visual elements).

Please check the example and let me know if this works for you.

Best wishes,
Tsvyatko
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
Sushil
Top achievements
Rank 1
Answers by
Sushil
Top achievements
Rank 1
Tsvyatko
Telerik team
Share this question
or