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.
Syncfusion Feedback

Changing CellValueType

Thread ID:

Created:

Updated:

Platform:

Replies:

35493 Oct 2,2005 02:22 PM UTC Oct 2,2005 11:29 PM UTC Windows Forms 1
loading
Tags: GridControl
Michael Smith
Asked On October 2, 2005 02:22 PM UTC

I am trying to change the cellvaluetype for an unbound grid from the apparent default of string to double. I have tried to do this as follow: Dim GridstyleDouble As New GridStyleInfo GridstyleDouble.CellValueType = Type.GetType("Double") GridControl1.ChangeCells(GridRangeInfo.Cells(1, 1, 365, 1), GridstyleDouble) However, it does not work. Is there some way to easily set the cells valuetype of an unbound grid cell using VB.NET? I have also tried to set each cell individually using ... GridControl1.Item(i, j).CellValueType = type.GetType(Double) But, it does not recognize the notation "Double". The only thing that appears to work is to manually convert the value to double using System.Convert.ToDouble(GridControl1.Item(i - 1, j).CellValue) This is the only way that I can work with the values in a grid. Any thoughts to help a newbie?

Administrator [Syncfusion]
Replied On October 2, 2005 11:29 PM UTC

Here is a little sample. It uses the VB operator GetType which accepts a name instead of the object required by Type.GetType. http://www.syncfusion.com/Support/user/uploads/GC_Double_e50a08de.zip

CONFIRMATION

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.

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

;