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
close icon

Hiding the lines in Grid

Hi all,

How to make the grid display without lines
that separates two records and also how to make the particular cell dispaly in bold letter.

thanks in advance

Regards

Dhana

3 Replies

AD Administrator Syncfusion Team December 27, 2006 10:37 AM UTC

Hi Dhana,

>>>>>How to make the grid display without lines?

Use the Propertire.DisplayXXXLines property to hide/show the lines in a grid. Below is a code snippet

this.gridControl1.Properties.DisplayHorzLines = false;
this.gridControl1.Properties.DisplayVertLines = false;

>>>>How to make the particular cell dispaly in bold letter?
///For GridControl.
this.gridControl1.Model[1,1].Font = new GridFontInfo(new Font("Arial",12f,FontStyle.Bold));
///For GridDataBoundGrid.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=53966

Best Regards,
Haneef


DH dhana December 27, 2006 10:53 AM UTC

Hi hanee!

The code :
this.gridControl1.Properties.DisplayHorzLines = false;
this.gridControl1.Properties.DisplayVertLines = false;

has no effect on the my grid.

any other suggestion please.

thanks for ur quick response.

Regards,

Dhana





AD Administrator Syncfusion Team December 27, 2006 11:35 AM UTC

Hi Dhana,

You can handle the PrepareViewStyleInfo event and set e.Style.Borders.All to GridBorder.Empty. Here is a code snippet.

this.gridControl1.PrepareViewStyleInfo+=new GridPrepareViewStyleInfoEventHandler(gridControl1_PrepareViewStyleInfo);

private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{ e.Style.Borders.All = GridBorder.Empty; }

Here is a sample.
GCBorderStyle.zip

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon