We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Misc. features

Thread ID:





76036 Aug 20,2008 12:46 PM UTC Aug 20,2008 06:41 PM UTC WPF 3
Tags: GridControl
Jeff Yang
Asked On August 20, 2008 12:46 PM UTC

I've tried to look in the documentation but can't seem to find these features:
1. grid selection mode (columns only, rows only, none, cells, etc.)
2. turning off cell editing
3. borders (colors and disabling)
4. cell text color
5. turn off resizing of rows/cols
6. having the last column stretch to fill the grid width

thanks in advance

Administrator [Syncfusion]
Replied On August 20, 2008 02:57 PM UTC

1) Selection support was added between version and You can see a sample at

2) One way to do this is to set the style.CellType = "Static"

grid.Model.[4, 5].CellType = "Static";

Another way to do this is set style.ReadOnly = true. You can do it grid-wide with code like:

grid.Model.TableStyle.ReadOnly = true;

3) You control the borders by setting the style.Borders properties.

grid.Model[3, 3].Borders.Right = new Pen(Brushes.Red, 1.5);
grid.Model[3, 3].Borders.Bottom = new Pen(Brushes.Red, 1.5);

If you want a border to be empty, set the style.Borders.XXXXX property to be null.

4) With the release of 6.3.1.x (out sometime this week), there are style.Font properties that let you control the text color. In earlier versions, you would have to use a DataTemplate (we ship a sample showing how you can use a DataTemplate).

5) We will make this easier in future releases, but right now, the best way to handle this is to remove the default mousecontrollers that manage the sizing. This will prevent the resizing of any row or column.

Here is code the removes the exisiting controllers.

//remove the sizing mouse controllers
IMouseController mc;
while ((mc = grid.MouseControllerDispatcher.Find("ResizeRowsMouseController")) != null)
while ((mc = grid.MouseControllerDispatcher.Find("ResizeColumnsMouseController")) != null)

6) There is no property setting to support this currently. But you could do it by monitoring the windows width and setting the last column width accordingly. Here is a minimal sample.


Jeff Yang
Replied On August 20, 2008 06:14 PM UTC

Regarding, it seems that there might be a bug in that both the column resize and row resize controllers share the same name. therefore the code:
IMouseController mc;
while ((mc = grid.MouseControllerDispatcher.Find("ResizeRowsMouseController")) != null)

removes both column and row resizing functionality.

Administrator [Syncfusion]
Replied On August 20, 2008 06:41 PM UTC

This has been corrected in the 6.3.1.x build that should be available for download sometime this week.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon