This is a migrated thread and some comments may be shown as answers.

[Solved] Problem setting HeaderStyle.Width

3 Answers 140 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JP Shilton
Top achievements
Rank 1
JP Shilton asked on 11 Aug 2009, 02:54 PM
Just wondering if this is a known bug or not. Setting the width programmatically:
      
rgAuthorizations.Columns.FindByDataField("HExports").HeaderStyle.Width = New Unit(20, UnitType.Point) 

I get the following exception:

System.SystemException: Unknown length unit 'ptpx' 
  at Telerik.Web.Apoc.ApocDriver.FireApocError(String message) 
  at Telerik.Web.Apoc.DataTypes.FixedLength.Convert(Double dvalue, String unit) 
  at Telerik.Web.Apoc.DataTypes.FixedLength..ctor(Double numUnits, String units) 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parsePrimaryExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseUnaryExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseMultiplicativeExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseAdditiveExpr() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parseProperty() 
  at Telerik.Web.Apoc.Fo.Expr.PropertyParser.parse(String expr, PropertyInfo propInfo) 
  at Telerik.Web.Apoc.Fo.PropertyMaker.Make(PropertyList propertyList, String value, FObj fo) 
  at Telerik.Web.Apoc.Fo.PropertyListBuilder.MakeList(String ns, String elementName, Attributes attributes, FObj parentFO) 
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.StartElement(String uri, String localName, Attributes attlist) 
  at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)  

I have tried it with Points and EMs as my units.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Aug 2009, 07:49 AM
Hi,

I tried the above given line of code on my end and it is working perfectly. Can you try the following approach to set the width of the Grid column and see whether it is working.

 
rgAuthorizations.MasterTableView.GetColumn("columnUniqueName").HeaderStyle.Width = Unit.Point(20) 

Thanks
Shinu
0
JP Shilton
Top achievements
Rank 1
answered on 12 Aug 2009, 08:41 PM
Thanks for your reply. It's still throwing the same exception.
0
JP Shilton
Top achievements
Rank 1
answered on 14 Aug 2009, 03:45 PM
Any ideas?
Tags
Grid
Asked by
JP Shilton
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
JP Shilton
Top achievements
Rank 1
Share this question
or