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.
Unfortunately, activation email could not send to your email. Please try again.

Setting CellType via Datatrigger and Style

Thread ID:

Created:

Updated:

Platform:

Replies:

104414 Jul 17,2012 12:38 PM Aug 2,2012 11:55 AM WPF 1
loading
Tags: GridControl
Michael Krämer
Asked On July 17, 2012 12:38 PM

Hello Syncfusion Team,
is it posible to definie the Basic CellType of a Column via Style and DataTrigger ?
When we try to do something like:
           
            <Style x:Key="CelStyleTest" TargetType="{x:Type syncfusion:GridDataColumnStyle}">
                <Style.Triggers>
                    <DataTrigger Binding="DataItem.Type" Value="Double">
                        <Setter Property="CellType" Value="DoubleEdit"/>
                    </DataTrigger>
                </Style.Triggers>               
            </Style>

I only get "Exception has been thrown by the target of an invocation"


Regards

Michael


Rajasekar G [Syncfusion]
Replied On August 2, 2012 11:55 AM

 

Hi Kramer,

 

Thanks for the patience.

 

Since our GridDataColumnStyle is not derived from a FrameWorkElement you can’t apply style for it. We suspect that you are trying to change the cell type based on the Data Type, if you are familiar with the Data Type of that column you can directly assign it or you can achieve this in code behind by handling the ModelLoaded Event of Grid and validating each visible column there or you can achieve it by using Attached Property .

 

Please let us know if you have any queries.

 

Thanks,

Raja sekar.G

 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;