Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
70
Unable to change default header style of XamGrid.
posted

Am trying to change default header style of a XamGrid using HeaderCellControl property in Silverlight 5 application but am not able to use HeaderCellControl property. It is throwing error in designer saying this property is not available in namespace "http://schemas.infragistics.com/xaml". Below is my code.

<ig:XamGrid Height="500" Margin="30 20 0 0" Width="500" BorderThickness="0" Background="#333333" x:Name="dataGrid" AutoGenerateColumns="false" ColumnWidth="*" ItemsSource="{Binding}">
  <ig:XamGrid.Columns>
  <ig:ColumnLayout Key="Portfolios" HeaderVisibility="false">
  <ig:ColumnLayout.Columns>
  <ig:TextColumn Key="Id" >
  <ig:TextColumn.HeaderTemplate>
  <DataTemplate>
  <TextBlock Text="Test ID" Foreground="#FFC000"/>
  </DataTemplate>
  </ig:TextColumn.HeaderTemplate>
  </ig:TextColumn>
  <ig:TextColumn Key="Name" >
    <ig:TextColumn.HeaderTemplate >
  <DataTemplate>
  <TextBlock Text="Test Name" Foreground="#FFC000"/>
  </DataTemplate>
  </ig:TextColumn.HeaderTemplate>
  </ig:TextColumn>
  </ig:ColumnLayout.Columns>
  </ig:ColumnLayout>


   <ig:TextColumn Key="SampleId" >
  <ig:TextColumn.HeaderTemplate>
  <DataTemplate>
  <TextBlock Text="Sample ID " Foreground="#FFC000"/>
  </DataTemplate>
  </ig:TextColumn.HeaderTemplate>
  </ig:TextColumn>
  <ig:TextColumn Key="SampleName" >
  <ig:TextColumn.HeaderTemplate>
  <DataTemplate>
  <TextBlock Text="Sample Name Foreground="#FFC000"/>
  </DataTemplate>
  </ig:TextColumn.HeaderTemplate>
  </ig:TextColumn>

 </ig:XamGrid.Columns>

</ig:XamGrid>

In UserControl.Resources, I tried to have setter property in style with TargetType = "ig:HeaderCellControl" but it is not working. Need help on this. Or if this is not possible them please let me know if there is any alternate solution to change default styles of whole XamGrid.

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello Siva,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.

Children
No Data