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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

column-type numeric (vb)

Thread ID:





117545 Nov 5,2014 04:27 PM UTC Nov 16,2014 05:31 AM UTC WinForms 6
Tags: GridDataBoundGrid(Classic)
Frank Piplak
Asked On November 5, 2014 04:27 PM UTC


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 11, 2014 04:25 AM UTC

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 08:43 AM UTC


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 06:45 PM UTC


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 02:28 PM UTC

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 05:01 PM UTC

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 05:31 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon