BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Frank,
Thanks for using Syncfusion Products.
Query: Formatting Numeric
Columns in a GridDataBoundGrid |
You can just change the cell type for the columns in your
databound grid. For example. this.gdbs.Binder.InternalColumns[1].StyleInfo.CellType =
"Static";. For your specific
cell type, you could use NumericUpDown, Currency, MaskedEdit, or even
Static(if you format your value before you set it) In addition to setting the CellType property, this.gdb.Binder.InternalColumns[1].StyleInfo.CellType,
you can also set the Format property and the CellValueTyle
property. this.gdb.Binder.InternalColumns[1].StyleInfo.Format
= "#.####"; //or "F4" or ??? this.gdb.Binder.InternalColumns[1].StyleInfo.CellValueType
= typeof(double). |
Please let us know, if you any concerns.
Regards,
ManiRatheenam S
Hello,
I think that have a good solution:
With GridBound
' --- term to text ---
.Binder.InternalColumns("steMyField01").StyleInfo.CellType = "Static"
.Binder.InternalColumns("steMyField01").StyleInfo.CellValueType = GetType(System.String)
' --- byte to boolean
.Binder.InternalColumns("steMyField02").StyleInfo.CellType = "CheckBox"
.Binder.InternalColumns("steMyField02").StyleInfo.CellValueType = GetType(System.Boolean)
End With
My problem:
The value of the column 'steMyField02' in the database is 0 and 1 (Type Byte).
When I set:
.Binder.InternalColumns("steMyField02").StyleInfo.CellType = "Static"
.Binder.InternalColumns("steMyField02").StyleInfo.CellValueType = GetType(System.Boolean)
I get as result False and True in the grid but when I set:
.Binder.InternalColumns("steMyField02").StyleInfo.CellType = "CheckBox"
.Binder.InternalColumns("steMyField02").StyleInfo.CellValueType = GetType(System.Boolean)
I get as result only unchecked fields!?
Have you the solution for right way?
Best regards,
Frank The con
Hi Frank,
Thanks for the update.
The reported scenario can be achieved by using “CheckBoxOptions” property. Please refer the code,
Code:
Me.gridDataBoundGrid1.Model.ColStyles(1).CellType = GridCellTypeName.[Static]
Me.gridDataBoundGrid1.Model.ColStyles(1).CellValueType = GetType(Boolean)
Me.gridDataBoundGrid1.Model.ColStyles(1).CheckBoxOptions = New GridCheckBoxCellInfo("1", "0", "", True)
Me.gridDataBoundGrid1.Model.ColStyles(1).CellType = GridCellTypeName.CheckBox
Me.gridDataBoundGrid1.Model.ColStyles(1).CellValueType = GetType(Boolean)
Please let us know if you have any concern.
Regards,
Muthukumar K
Hi Frank,
We are glad to hear that the reported issue has been resolved. Please let us know if you need any further assistance.
Regards,
Muthukumar K