Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
695
Grid Styling
posted

Hi,

I have used the following code to start styling my gridview.

            gridview.BackgroundColor = UIColor.Gray;
            gridview.HeaderBackgroundColor = UIColor.DarkGray;
            gridview.RowSeparatorColor = UIColor.DarkGray;

However, want to provide a vertical line between all columns for the height of the grid, just as I have done for the rows (RowSeperatorColor) - i.e. make this look like Excel.

Can this be achieved? I cannot see any properties to do this.

Thanks in advance.

Parents
No Data
Reply
  • 4940
    Offline posted

    Currently, grid lines are not a feature of the grid, but the feature request in the backlog for a future release. Previous to your question, I've simulated grid lines by setting the background color of the grid to a color, such as black, then applying a value of 1.0 to the row spacing and column spacing properties. The result is the image below.

    _gridView.BackgroundColor = UIColor.Black;
    _gridView.RowSeparatorHeight = 0.0;
    _gridView.RowSeparatorColor = UIColor.Clear;
    _gridView.RowSpacing = 1.0;
    _gridView.ColumnSpacing = 1.0;

Children
No Data