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.
I am using a gridDataBoundGrid wherein I have used a DataTable as the Datasource.I am not using any GridBoundColumns.How do I go about setting Column styles(Readonly,HorizontalAlignment) for specific columns without using GridBoundColumns?
Is it possible to set Column styles(Readonly,HorizontalAlignment) for specific columns without mapping the DataColumns as GridBoundColumns?
JJJisha Joy Syncfusion Team January 23, 2008 10:26 AM UTC
Hi Keshav, Thank you for your interest in Syncfusion Products. Please refer the following code snippets that shows how to set the Column styles(Readonly,HorizontalAlignment) for specific columns: this.gridDataBoundGrid1.Binder.InternalColumns[0].StyleInfo.ReadOnly=true; this.gridDataBoundGrid1.Binder.InternalColumns[0].StyleInfo.HorizontalAlignment = GridHorizontalAlignment.Center;
Kindly try this and let me know if this helps. Regards, Jisha
KKKeshav KamatJanuary 29, 2008 01:09 PM UTC
Thanks a lot for your help. I am able to set these column styles but what about column widths?can i set column width without using gridboundcolumns?doesnt seem to work with
this.gridDataBoundGrid1.Model.ColWidths[0]= 100;
JJJisha Joy Syncfusion Team January 30, 2008 05:17 AM UTC
Hi Keshav, Thank you for your update. You can set the ColWidths of specified column by handling the QueryColWidth event of GridDataBoundGrid. Please refer the following code snippets: this.gridDataBoundGrid1.Model.QueryColWidth += new GridRowColSizeEventHandler(Model_QueryColWidth);