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

Data triggers in cell style

1 Answer 64 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tomwe
Top achievements
Rank 1
Tomwe asked on 23 May 2013, 05:42 PM
I am looking for a sample of using Data triggers in cell style with auto commit

,something like the below style(not working)

Whenever user press a key inside the editor,i would like that the trigger will evaluate the current text

<Style x:Key="LengthStyle" TargetType="telerik:GridViewCell" BasedOn="{GridViewCellStyle}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsValidLength}" Value="False">
                    <Setter Property="Background"   Value="red" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsValidLength}" Value="True">
                    <Setter Property="Background"   Value="green"  />
                </DataTrigger>
            </Style.Triggers>
  </Style>

Thanks in advance
      

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 27 May 2013, 10:28 AM
Hello,

You could set the UpdateSourceTriggers properly to control when the PropertyChanged event will be raised (if your business object implements the INotifyPropertyChanged interface). Once such a notification is raised, the cell's Style will be updated.

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Tomwe
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or