I want to show Grid lines in solid and also want to color it.
I tried to set these properties in
Dim grid As GridDataBoundGrid = sender
grid.Model.Properties.DisplayHorzLines = True
grid.Model.Properties.DisplayVertLines = True
where i am missing, also i dont find in you samples, knowledge base, forums (!?)
Am I Right?
California SOftware, INDIA
ADAdministrator Syncfusion Team 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.