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

Word wrap in datagrid

I can only get word wrap to work for the current cell in a datagrid. How can you get it to wordwrap whether a cell is selected or not? I''ve seen the question posted on a few forums - but never an answer. Thanks!

2 Replies

DJ Daniel Jebaraj Syncfusion Team February 25, 2005 12:17 AM UTC

Test. Please ignore. >I can only get word wrap to work for the current cell in a datagrid. How can you get it to wordwrap whether a cell is selected or not? I''ve seen the question posted on a few forums - but never an answer. > >Thanks!


DJ Daniel Jebaraj Syncfusion Team February 25, 2005 12:23 AM UTC

[Posting for Stefan] Hi Sigurd, you can loop through all the columns of the related table when you access the ChildTableDescriptor of the RelationDesriptor, e.g. in the ForeignKeyReference example: this.gridGroupingControl1.DataSource = table; mainTd.Name = "ForeignKeyReference"; mainTd.Columns.LoadDefault(); foreach (RelationDescriptor rd in mainTd.Relations) { if (rd.RelationKind == RelationKind.ForeignKeyReference) { foreach (FieldDescriptor fd in rd.ChildTableDescriptor.Fields) { string name = countriesRd.Name + "_" + fd.Name; GridColumnDescriptor cd = mainTd.Columns.FindByMappingName(name); if (cd != null) Console.WriteLine(cd.Name); } } } Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon