Click here to Skip to main content
15,894,362 members

Comments by vinothezhilan m (Top 2 by date)

vinothezhilan m 4-Mar-13 9:43am View    
Deleted
now i altered the code to
<my:datagrid autogeneratecolumns="True" scrollviewer.horizontalscrollbarvisibility="Auto" scrollviewer.verticalscrollbarvisibility="Auto" itemssource="{Binding Path=Team_Details}" margin="6,6,70,0" name="dataGrid1" height="212" verticalalignment="Top">
<my:datagrid.cellstyle>
<Style TargetType="{x:Type my:DataGridCell}">
<Style.Triggers>

<datatrigger binding="{Binding Path=Break1, Converter={StaticResource convert}, ConverterParameter=FirstBreak}" value="2">
<setter property="Background" value="{Binding Path=Threshold2Color}">

<datatrigger binding="{Binding Path=Break1, Converter={StaticResource convert}, ConverterParameter=FirstBreak}" value="3">
<setter property="Background" value="{Binding Path=Threshold3Color}">

<Trigger Property="IsSelected" Value="True">
<setter property="Background" value="Red">
</Trigger>
</Style.Triggers>
</Style>



in this the threshold color is applied to that row. but i need to apply the color for one particular cell.
so i need to get the column name in the multidatatrigger condition as below
<multidatatrigger>
<multidatatrigger.conditions>
<condition binding="{Binding Path=Break1, Converter={StaticResource convert}, ConverterParameter=FirstBreak}" value="1">
<condition property="Columnheader[0]" value="Break1">

<setter property="Background" value="{Binding Path=Threshold1Color}">

can u help....
vinothezhilan m 4-Mar-13 9:38am View    
actually i use AutoGenerateColumns="True". how can i add datagridtextcolumn to that datagrid