Hi, I am using silverlight xamgrid v10.3. I have a xamgrid bound to a datasource, My requirement is
to have an alternate row style for the grid and also highligt the selected row or active row.
For alternate row i created a style(as mentioned in the samples) and set the
CellStyle="{StaticResource igAltRowStyle}" RowHover="None"
of the grid. However after doing this the row highlight does not seem to be working.
Could you please let me know as to how to enable rowhighlighting for xamgrid that has an alternate
row style?
Set IsAlternateRowsEnabled="False" for the xamgrid
Setting IsAlternateRowsEnabled="False" does not resolve the issue.
All i need to do is as per the snapshot attached. (I need alternate row colors and also rowhighlighting)
How do i do this in silverlight xamgrid?
Hi,
Sorry, the cell.Row property is of type RowBase.
Just cast it as a Row;
((Row)NewActiveCell.Row).CellStyle
-SteveZ
Hi Stephen,
I am unable to find CellStyle or Style property for the pereviousActiveCell.Row or NewActiveCell.Row, Are these available in NetAdvantage 2010.3 version?
Thank you,
Roshan R
Hi Roshan,
We don't currently have a VisualState that triggers for the entire row, when a Cell is made Active.
As a workaround, you could listen the ActiveCellChanging event, and set the previous ActiveCell.Row.CellStyle to null and the new ActiveCell.Row.Style = a custom style
Hope this helps,
Thank you for your reply. I have this implemented already. I wanted the active row to be highlighted as well, at present only the active cell is highlighted. Is there a work around for this? Will this be available in any future release of Infragisitcs ?
Rgds,
Roshan
Ok, to do what you wan't, you're going to have to modify the ControlTemplate of the CellControl for the xamGrid.
Here is an article on how to do this with Blend: http://help.infragistics.com/NetAdvantage/Silverlight/2011/1/CLR4.0/?page=SL_DesignersGuide_Editing_Style_Properties_Using_Expression_Blend.html
If you don't have Blend, you can get access to our default control styles here:
http://help.infragistics.com/NetAdvantage/Silverlight/2011/1/CLR4.0/?page=SL_DesignersGuide_Location_of_Generic_xaml_File.html
You can set Selection on the xamGrid to RowSelection
<ig:XamGrid.SelectionSettings>
<ig:SelectionSettings CellClickAction="SelectRow" CellSelection="None" RowSelection="Single"/>
</ig:XamGrid.SelectionSettings>
Then you can set RowHover to None.
The only thing we don't offer is a VisualState for the active row, just Active cell.