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. Image for the cookie policy date

Custom type cell value in textbox

I am trying to use a custom type as the value in a textbox cell. Dim myCell As New myOwnCellClass myGrid(1,1).CellValue = myCell myGrid(1,1).Text = "A string" But when I assign the text property the cellValue gets overwritten and if I leave the text field blank the type gets displayed in the cell. Is it possible to store custom defined class in the cell and display a string value? Can I do it by overloading some methood in my class?

2 Replies

AD Administrator Syncfusion Team September 2, 2003 09:53 AM

Try overriding the ToString method of your class to determine what is displayed when something asks for a string representation of an object of type of your class.


JO Jonas September 2, 2003 11:13 PM

Your suggested solution works perfect, thanks a lot!

Loader.
Live Chat Icon For mobile
Up arrow icon