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 have GridGroupingControl form, want to show column "IsSupperSection" as checkbox. "IsSupperSection" column is numeric field (Not a boolean field). I used following code to set the column celltype. The checkbox does not display "CHECKED" for value other than 0; I clike the CheckBox, nothing happens.
any idea?
// ... load data
gdBase.DataSource = mGridDataSet.Tables["MyTable"];
gdBase.TableDescriptor.Columns.LoadDefault();
string ColumnName="IsSupperSection";
this.gdBase.TableDescriptor.Columns.[ColumnName].Appearance.AnyRecordFieldCell.CellType ="CheckBox";
this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ShowButtons=GridShowButtons.ShowCurrentCell;
ADAdministrator Syncfusion Team May 30, 2005 07:10 PM UTC
You will also need to set teh CheckBoxOptions so the grid knows what values you are using for Checked and Unchecked.
GridStyleInfo style = this.gridGroupingControl1.TableDescriptor.Columns["check"].Appearance.AnyRecordFieldCell;
style.CellType ="CheckBox";
style.CheckBoxOptions = new GridCheckBoxCellInfo("1", "0", "", true); //use 1 and 0 for values
LMLan Mo May 30, 2005 07:52 PM UTC
Thanks Clay. My code works now.
>I have GridGroupingControl form, want to show column "IsSupperSection" as checkbox. "IsSupperSection" column is numeric field (Not a boolean field). I used following code to set the column celltype. The checkbox does not display "CHECKED" for value other than 0; I clike the CheckBox, nothing happens.
>
>any idea?
>
>
>// ... load data
>gdBase.DataSource = mGridDataSet.Tables["MyTable"];
>gdBase.TableDescriptor.Columns.LoadDefault();
>string ColumnName="IsSupperSection";
>this.gdBase.TableDescriptor.Columns.[ColumnName].Appearance.AnyRecordFieldCell.CellType ="CheckBox";
>this.gdBase.TableDescriptor.Columns[ColumnName].Appearance.AnyRecordFieldCell.ShowButtons=GridShowButtons.ShowCurrentCell;
>