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.

Inserting text into cell bound to an integer column in GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

34433 Sep 9,2005 01:07 AM Sep 9,2005 06:07 AM Windows Forms 1
loading
Tags: GridControl
Atith Pagdi
Asked On September 9, 2005 01:07 AM

Hi, I have a GDBG which has been bound to a DataTable. One of the columns is an integer column. Depending on the value in this integer column, I want to set the text in the corresponding cell. But in the PrepareViewStyleInfo for the GDBG, if I set the e.Style.Text property to "NA" if it was 0, then "Input string was not in correct format" gets displayed in the cell. Is there any other way of doing this i.e. inserting text into a cell that has been mapped to a number column? Thanks

Administrator [Syncfusion]
Replied On September 9, 2005 06:07 AM

Hi Atith, Try handling DrawCellDisplayText event and set e.DisplayText. private void gridDataBoundGrid2_DrawCellDisplayText(object sender, Syncfusion.Windows.Forms.Grid.GridDrawCellDisplayTextEventArgs e) { if(e.Style.CellIdentity.ColIndex==1 && e.Style.CellIdentity.RowIndex>0 ) { e.DisplayText="Hi"; } } Here is a sample: mappingname.zip Regards, Jeba.

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.

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.

;