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

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 3, 2003 03:13 AM UTC

Your suggested solution works perfect, thanks a lot!

Loader.
Up arrow icon