Skip to main content
Home Forums Silverlight Programming Programming with .NET - General How to show a DataGrids's CellEditingTemplate when its height is bigger than the row ? (its clipping by default)
5 replies. Latest Post by lawazia on November 4, 2009.
(0)
joer00
Member
145 points
113 Posts
04-30-2008 2:11 PM |
Hi,
I show data in a grid and need an complex editor to alter the data. When editing the cell the Editor is clipped to the row height. As of many posts here there is no rows collection so I cannot dynamically alter the height. Whats the solution to solve this ?
Preferable I want to use custom user controls as an edit template. One ugly workaround is to dynamically set the content of teh RowDeatils template and than alter the visibility status.
I hope there is a better solution ?
swildermuth
Star
8320 points
1,546 Posts
05-02-2008 6:43 AM |
The DataGrid is still pretty young code so I would guess it will get better, but for now you might wantt to consider having your user control Override Measure to ensure that the DataGrid knows how big it is.
05-02-2008 9:22 AM |
thanks but doing this.Measure(new Size(200, 200)); in my user control results in a CRASH (attempt to override protected memory). Before I report this as a bug, did I do something wrong ?
this.Measure(new Size(200, 200));
in my user control results in a CRASH (attempt to override protected memory).
Before I report this as a bug, did I do something wrong ?
05-03-2008 4:09 AM |
Sorry, you should override the OnMeasure, not call Measure...so that the contain should call you when its ready to measure.
05-05-2008 8:04 PM |
unfortuantely that does not work either. No error this time but the cell just stays the same size.
Did I still do something wrong or is it a bug in DataGrid ?
protected override Size MeasureOverride(Size availableSize){return new Size(100, 100);}
lawazia
126 points
59 Posts
11-04-2009 6:28 PM |
Is there any solution for this ? I am also facing the same problem.