Setting CellType via Datatrigger and Style

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


1 Reply

RG Rajasekar G Syncfusion Team August 2, 2012 03:55 PM UTC

 

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

 


Loader.
Up arrow icon