We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Conditional styling doesn't when editing a row

How can I trigger the condtional styling to be evaluated when I edit a row of a SfDataGrid?

3 Replies

JP Jagadeesan Pichaimuthu Syncfusion Team May 28, 2019 08:58 AM UTC

Hi Francois, 
  
Thanks for using Syncfusion product. 
  
We analyzed your query regarding conditional styling to be evaluated on editing and your requirement can be achieved by styling with Converter. Please find the example below, 
  
<Style x:Key="rowStyle" TargetType="syncfusion:VirtualizingCellsControl"> 
    <Setter Property="utils:SetterValueBindingHelper.PropertyBinding"> 
        <Setter.Value> 
            <utils:SetterValueBindingHelper Property="Background" Binding="{Binding Column1,Converter={StaticResource converter}}"/> 
        </Setter.Value> 
    </Setter> 
</Style> 
  
Please find sample from the link below, 
  
Please refer to the UG link below for more details on conditional styling, 
  
Please let us know if you need further assistance. 
  
Regards, 
Jagadeesan


FM François Mouchati May 28, 2019 10:18 AM UTC

Thank you for your reply.
I do use the converter as per the doc. Yet it doesn't work once you edit the viewmodel. As if the binding was "OneTime".


DB Dinesh Babu Yadav Syncfusion Team May 29, 2019 05:03 AM UTC

Hi Francois, 
 
We analyzed the reported issue by changing the value in ViewModel. But we are unable to reproduce the aforementioned issue. Please find the test sample from the link below. 
 
 
If you are still facing the same issue, please revert us with the code example on how to edit the value and brief replication / video illustration. If possible, revert us with the modified sample. It will help us to further investigate and provide earlier prompt solution. 
 
Regards, 
Dinesh Babu Yadav 


Loader.
Live Chat Icon For mobile
Up arrow icon