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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CellValueType = int, Value = null

Thread ID:

Created:

Updated:

Platform:

Replies:

9652 Jan 6,2004 12:28 AM UTC Jan 6,2004 06:49 AM UTC WinForms 1
loading
Tags: GridControl
andre
Asked On January 6, 2004 12:28 AM UTC

I need to have a cell that is initially empty, but that has a cellvaluetype of int. I find that if I set the cellvaluetype to int, but do not set the cellvalue to an integer, then I get the following exception: System.Exception: is not a valid value for Int32. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.String.get_Chars(Int32 index) at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) I could ignore the cellvaluetype, ie leave it as text, but then I lose the built-in valuetype checking. Going further, I could also do my own validation, but that seems like I''m working against the grid rather than with it. Am I missing something obvious? This seems like a fairly common need: cells that have a an assigned type but that are blank until data is entered.

Administrator [Syncfusion]
Replied On January 6, 2004 06:49 AM UTC

What version of our grid are you using? Unless I am missing something, I do not see a problem in 1.6.1.8 trying to have CellValueType = typeof(int) and CellValue = null in this sample that has both a GridControl and a GridDataBoundGrid with such cells. forum_cellvaluetype_6389.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

;