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

ColStyles in DataBoundGrid


Hi ... I want to know, how can i set column style in Data Bound Grid.

2 Replies

AD Administrator Syncfusion Team December 22, 2006 04:49 AM UTC

Hi Ubaid,

For the GriddataBoundGrid, there are two different ways to do this. If you want the column nCol to be readonly, you can use code such as:

//C#
this.gridControl1.ColStyles[nCol].ReadOnly = true;
this.griddataBoundGrid1.Binder.InternalColumns[nCol-1].StyleInfo.ReadOnly = true;

//VB.NET
Me.GridControl1.ColStyles(nCol).ReadOnly = True
Me.GriddataBoundGrid1.Binder.InternalColumns(nCol-1).StyleInfo.ReadOnly = True

Let me know if you have problems with either of these items.

Best Regards,
Haneef


UB Ubaid December 22, 2006 10:52 AM UTC

Thanks Haneef ... i have tried the foolowind code and its working fine

gridDataBoundGrid1.Model.ColStyles[Counter].Font.Facename="Arial"

Loader.
Live Chat Icon For mobile
Up arrow icon