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

Inserting text into cell bound to an integer column in GDBG

Thread ID:





34433 Sep 9,2005 05:07 AM UTC Sep 9,2005 10:07 AM UTC WinForms 1
Tags: GridControl
Atith Pagdi
Asked On September 9, 2005 05:07 AM UTC

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 10:07 AM UTC

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.


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