After having successfully deployed a WinForm solution using UltaWinGrid (.net 2.0), we are currently evaluating xamDataGrid to be used on a new project with WPF. The grid will be used in a Desktop application and will not be used in a RIA. So my question is, does xamDataGrid provide equivalent functionality as the UltraWinGrid for the following? (FYI, we used UltraWinGrid to bind a BindingList of object.)
- Editable cell based on conditions on the object.
- Customize Row background/foreground colors on each Row based on conditions on the object .
- Parent/Child relationship on the objects
- Group By columns
- Custom Column Filters
- KeyDown/KeyPress events
Also, in terms of performance which one would be better? xamDataGrid (in WPF) vs UltraWinGrid (in WinForm) The grid will be bound to about 3000 to 5000 records at one time and the data in the BindingList will be updated via another thread in the background.
I am very new to WPF and xamDataGrid and looking for a place to start. Is there any articles/wiki that I can read/learn on how to achieve the above using xamDataGrid?
Thanks in advance.
Ok. solved this using one style without x:key with multiple DataTriggers in style.
Thank you.
Hi Alex.
I just wanted to paint rows(not a cell) in different colors using a style without x:key:
let say row[0] - red, row[1] - green, row[2]-blue, row[3] -yellow and converter checks values in
cells of a "rowIndex" field. In winforms ultragrid it can be done easily with row filters.
Thank you in advance for your help.
WPF supports only one local style - that is for one element. So, if you trying to format cells conditionally, you can have only one style. That is why the converter is used - to create different results based on the condition.
If you want to format them based on the Field (column), then you have to create different styles (with different x:keys) and set them at the CellValuePresenterStyle property of the specific Field's Settings.
For example, you can change the background of a cell based on an integer field( >0 or <0) and change the foreground based on a boolean field.
I used this approach
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=10107
to paint the whole record based on a value in a cell.
But I cannot create another style with the same TargetType="{x:Type igDP:CellValuePresenter }
for painting other records based on value in another cell. I am getting exception(key exists in
resources collection).
I can create the second style with TargetType="{x:Type igDP:DataRecordCellArea } but I need
more then just two styles. Thank you in advance for your help.