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. Image for the cookie policy date

Overriding some visual behavior

Clay, first of all, I want to say thanks for the help yesterday. Calling ResetVolatileData after updating the Col.HeaderCount fixed my problem. I need to override a few different visual aspects of the grid and I''m not really sure how to do it. We''re using ExcelLikeSelection and the current cell has that black selection border. We need to modify that. How would I go about it? Also, for resizing rows and columns, I need to change both the cursor AND the rendering of the re-size lines. Any hints on how to go about those? Thanks again for the help.

1 Reply

AD Administrator Syncfusion Team April 14, 2005 12:09 AM UTC

GridControl has a ExcelLikeFrameSelections property that holds the object that handles and draws the excel selections. I think you would have to create your own class to get at the drawing code. You could copy the GridPaintExcelLikeSelection class from our code and modify it to do what you need. Then you woul dset an iunstance of your class into gridControl1.ExcelLikeFrameSelections to get teh grid to use your code. I haven''t actually done this so I do not know what kind of problems you might hit. To control the sizing of rows and columns, you will have to register a derived GridResizeCellsMouseController obejct and have the grid use your mouse controller instead of the default mouse controller. Here is code that would tell the grid to use your controller. this.gridControl1.Model.Options.ControllerOptions &= ~GridControllerOptions.ResizeCells; MySelectCellsMouseController sizeCellsController = new MySizeCellsMouseController(grid); gridControl1.MouseControllerDispatcher.Add(sizeCellsController);

Loader.
Up arrow icon