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

How to display a CellValue in GGC, even if the value is not in LookupTable (ForeignKeyReference)?

Thread ID:





50759 Oct 18,2006 02:52 PM UTC Nov 1,2006 09:15 AM UTC WinForms 1
Tags: Grouping
Volker Matzken
Asked On October 18, 2006 02:52 PM UTC

Hi all,

I have a GGC bound to a Dataset with a Column that has a Relation to a LookupTable (RelationKind.ForeignKeyReference).
If there is a value in that Column that does not match a value in the LookupTable the Cell shows up empty. Is there a way to show the "wrong" value in the cell?

Thanks in advance and regards

Administrator [Syncfusion]
Replied On November 1, 2006 09:15 AM UTC

Hi Volker,

Our apologies for the delay in response.

You can handle the Model.QueryCellFormattedText event of the GridTableControl and set the e.Text to e.Value to want to display. Use the e.Style.CellIdentity.RowIndex and e.Style.CellIdentity.ColIndex to get the row and column of the cell for which the displaytext has to be set. Below is a code snippet.

//Form Load Handler
this.gridGroupingControl1.TableControl.Model.QueryCellFormattedText +=new GridCellTextEventHandler(Model_QueryCellFormattedText);

private void Model_QueryCellFormattedText(object sender, GridCellTextEventArgs e)
if( e.Style.CellType == "ForeignKeyCell" && e.Value != null)
e.Text = e.Value.ToString() ;
e.Handled = true;

Here is a sample.

Let me know if this helps.

Best Regards,


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