The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team February 1, 2003 05:22 PM UTC
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.