Click here to Skip to main content
15,900,906 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Code Project.
Need Help. i have datagrid with auto generate columns false. Columns are adding from code behind(bottom i will upload screenshot) So i need to Highlight rows in date range for example from 31/8/2011 04/9/2011 where room number = 777 . I really need a help :) please :)
http://imageshack.us/photo/my-images/641/captureqg.jpg/[^]
Posted

1 solution

I come from a Silverlight perspective so these are just ideas to follow until someone more WPF oriented answers.

We use the telerik controls and they have a cellstyleselector concept that changes the cell format based on the content of the bount object.

If you are not using telerik then you need to manage the grid cell state in your data. This means you need to add a field to you data collection that can be calculated to manage the cell format. You then bind the cell property (foreground/background etc) to that field.

One thing you should NOT do is use the cellchanged events to manage the format, alway base your UI management on a data field in you collection or the viewmodel.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900