Home Forums WPF controls Xceed DataGrid for WPF Regarding DataCell

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #24693 |

    hi all
    I have created a datatable (dt) and added columns and rows to get the bounded data from it.
    then I have assigned it to the Xceed datagrid control to access the functionality.
    now I want change the color of the DataCell depending upon the value it holds.
    thnx….
    waiting for answers…

    Imported from legacy forums. Posted by yogesh (had 752 views)

    Xceed Support
    Member
    Post count: 5658

    What you need to do is create a style for DataCell and place a DataTrigger in the style for the desired value.

    http://doc.xceedsoft.com/products/XceedWpfDataGrid/Styling%20Elements.html

    Imported from legacy forums. Posted by Marcus [Xceed] (had 363 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks Markus
    I have added 1 more query about event tracking ..
    If you can help me out in that sense…
    Thank you 1ce again

    Imported from legacy forums. Posted by yogesh (had 251 views)

    User (Old forums)
    Member
    Post count: 23064

    hi
    I tried taking data triggers but it is not giving me the desired result.
    It is not changing the data cell’s color according to the values specified in data trigger.
    wht could be going wrong?

    Imported from legacy forums. Posted by yogesh (had 262 views)

    User (Old forums)
    Member
    Post count: 23064

    The first example at

    http://doc.xceedsoft.com/products/XceedWpfDataGrid/Styling%20Elements.html

    shows how to use a style to change the appearance of the grid’s cells. But this way affects all the cells equally.

    How could I change the appearance of the cells of a single column? I have tried to use Column.CellContentTemplate, but this causes me to write a new template, and also affects only the “content” part of the cell, not the whole cell, so if I change the background, I see a small border around it, corresponding to the cell’s padding.

    Imported from legacy forums. Posted by Andrés (had 490 views)

    Xceed Support
    Member
    Post count: 5658

    If you need further help achieving your goal, you will need to post more details on your problem and the code you currently have that does not work.

    Imported from legacy forums. Posted by Marcus [Xceed] (had 180 views)

    User (Old forums)
    Member
    Post count: 23064

    What if we want to do this with code behind? How is this achieved? Can we get a sample of this?

    Imported from legacy forums. Posted by David (had 512 views)

    User (Old forums)
    Member
    Post count: 23064

    There are two solutions for this case in <a href=”http://forums.xceed.com/forums/ShowPost.aspx?PostID=9863″>this thread</a>, one with code and another one with XAML.

    Imported from legacy forums. Posted by Andrés (had 5980 views)

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.