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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom type cell value in textbox

Thread ID:





6867 Sep 2,2003 11:36 AM UTC Sep 3,2003 03:13 AM UTC WinForms 2
Tags: GridControl
Asked On September 2, 2003 11:36 AM UTC

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?

Administrator [Syncfusion]
Replied On 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.

Replied On September 3, 2003 03:13 AM UTC

Your suggested solution works perfect, thanks a lot!


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

Live Chat Icon For mobile
Live Chat Icon