AD
Administrator
Syncfusion Team
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.
http://www.syncfusion.com/Support/user/uploads/ForeignKeyReference_34e6568e.zip
Let me know if this helps.
Best Regards,
Haneef