some questions

Hello Syncfusion,

I just started working with your WPF grid control and what can I say other than I am impressed. I have worked extensively with the windows forms grid control, which I think is fantastic, and I think it's great that the API between the windows forms version of the WPF version are somewhat similar. Anyway, now my questions.

1) How can I change the selection color?

2) How can I configure a cell such that when it's clicked on its text is not selected nor is a caret displayed. Do I have to create a datatemplate for this with just a textblock as content?

Thanks

GA


1 Reply

AD Administrator Syncfusion Team April 1, 2009 02:47 PM UTC

Hi Giancarlo,

Thanks for using Syncfusion products. Please check the details below,

1) Change selection color,

this.Grid.HighlightBrush = Brushes.Black;//#7FC0D8F1

The above code will change the selection color, Make sure you have some alpha value so that you can see the underlying text. I have appended some alpha blended value which you can convert to a SolidColorBrush and check.

2) Static text,

We already have the Cell renderers defined for make the text read-only. You can set the CellType as "Static" for this. If you want to use the TextBlock, there is a CellType = "TextBlock" that will initialize the TextBlock UIElement.

Please let me know if you want any more details.

Thanks,
Fahad
Grid.WPF Team
Syncfusion Inc.,


Loader.
Up arrow icon