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.
Unfortunately, activation email could not send to your email. Please try again.

column-type numeric (vb)

Thread ID:





117545 Nov 5,2014 11:27 AM Nov 16,2014 12:31 AM Windows Forms 6
Tags: GridDataBoundGrid(Classic)
Frank Piplak
Asked On November 5, 2014 11:27 AM


how to set a  type of a column and is it possible to set the type of a column to numeric, even though the column-type in database is non-numeric?

Best regards,

Maniratheenam Sehar [Syncfusion]
Replied On November 10, 2014 11:25 PM

Hi Frank,


Thanks for using Syncfusion Products.



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,


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.



ManiRatheenam S

Frank Piplak
Replied On November 11, 2014 03:43 AM


works fine, many thanks.

But one Question, how I must set the 'CellType' to get a checkbox in the grid (database type is byte)?

Best regards,

Frank Piplak
Replied On November 11, 2014 01:45 PM


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

Muthukumar Kalyanasundaram [Syncfusion]
Replied On November 14, 2014 09:28 AM

Hi Frank,


Thanks for the update.


The reported scenario can be achieved by using “CheckBoxOptions” property. Please refer the 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.



Muthukumar K

Attachment: GDBD__Check_79613ea1.zip

Frank Piplak
Replied On November 15, 2014 12:01 PM

Hi Muthukumar,

excellent, your example works not (at my project) but it shows me the solution.

At my project works this:

Me.gridDataBoundGrid1.Binder.InternalColumns(1).StyleInfo.CheckBoxOptions = New GridCheckBoxCellInfo("1", "0", "", True)
Me.gridDataBoundGrid1.Binder.InternalColumns(1).StyleInfo.CellType = "CheckBox"
Me.gridDataBoundGrid1.Binder.InternalColumns(1).StyleInfo.CellValueType = GetType(System.Boolean)

Many thanks!

Muthukumar Kalyanasundaram [Syncfusion]
Replied On November 16, 2014 12:31 AM

Hi Frank,


We are glad to hear that the reported issue has been resolved. Please let us know if you need any further assistance.



Muthukumar K


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.