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.
Unfortunately, activation email could not send to your email. Please try again.

How to show Grid Lines as solid (not borders)?

Thread ID:

Created:

Updated:

Platform:

Replies:

2578 Feb 1,2003 07:13 AM Feb 1,2003 12:22 PM Windows Forms 1
loading
Tags: GridControl
Rajaraman
Asked On February 1, 2003 07:13 AM

Hi I want to show Grid lines in solid and also want to color it. I tried to set these properties in gridDataBoundGrid1_PrepareViewStyleInfo Dim grid As GridDataBoundGrid = sender grid.Model.Properties.DisplayHorzLines = True grid.Model.Properties.DisplayVertLines = True grid.Model.Properties.GridLineColor=color.SteelBlue where i am missing, also i dont find in you samples, knowledge base, forums (!?) Am I Right? Regards Rajaraman California SOftware, INDIA

Administrator [Syncfusion]
Replied On February 1, 2003 12:22 PM

PrepareViewStyleInfo is hit every time a cell is drawn on the screen so that the cell specific style can be modified if desired. The settings you are trying to use, are gridwide setting. They apply to the whole grid and don't have to be set for every cell. So, it would be better do the grid wide settings, once say in the form's constructor or Form_Load. If you want to have blue solid lines in the whole grid, then you can do this by setting the TableStyle.Borders property. To get a thin solid line, you can just set two borders to do this. Me.Grid.TableStyle.Borders.Bottom = New GridBorder(GridBorderStyle.Solid, Color.SteelBlue,GridBorderWeight.Thin) Me.Grid.TableStyle.Borders.Right = New GridBorder(GridBorderStyle.Solid, Color.SteelBlue,GridBorderWeight.Thin) Again, since this applies to the whole table, you can just do this once in Form_Load. If you want to do this in PrepareViewStyleInfo, you would set these properties on teh e.Style.Borders. Here, you could condiitionally color the borders (or conditionally change other display properties of the style) based on teh e.ColIndex and e.RowIndex.

CONFIRMATION

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.

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.

;