User (Old forums)MemberApril 25, 2007 at 4:56 pmPost count: 23064
I inherited from teh Row class to have a row with numeric up down control in the footer row (adjust decimal points).
Here is how The Paintforground is overridden …
Rectangle displayRectangleInGridPoint = ClientRectangleToGrid(e.DisplayRectangle);
_control.Location = new Point(displayRectangleInGridPoint.X + 2 + (int)lable.Width, displayRectangleInGridPoint.Y + 1);
_control..Parent = _parentGridControl;
_control..Visible = true;
(_parentgridControl is passed in the constructor, lable is the lable i put for the control).
The problem with this code is if a user scrolls the grid and the footer row is not visible anymore, the control is still visible. Does not move.
I appreciate all the help
Imported from legacy forums. Posted by userX (had 2738 views)User (Old forums)MemberApril 26, 2007 at 3:08 pmPost count: 23064
This is because you paint the control into a specific location in the grid. You rather need to assign a control to the cell, so that when the cell goes out of sight, so does the editor.
In order to do this, you need to create your own editor, then assign it to the CellEditorManager from the derived cell by overriding the CellEditorManager property.
Look at the following sample :
<Install Folder>\Xceed Grid for .NET <version #>\Samples\CSharp\Extensibility
It demonstrates how to do this by creating a filter row. Look more specifically at the FilterEditor.cs, FilterRow.cs and FilterCell.cs files.
Imported from legacy forums. Posted by André (had 388 views)User (Old forums)MemberApril 27, 2007 at 6:08 pmPost count: 23064
I am using version 3.1 and dont see Extensibility folder, under Xceed Grid for .NET 3.1\samples\CSharp. But I can upgrade if this is available on a newer version
But the reason I decided to go this way is because I want the control width to be different from the a column width the cell is in. When I use a CellRow, the lable will take the first column width, and the control takes the send column width which i dont want.
Does the sample shows how to create a cellrow where the cells does not depend on the grid columns?
Imported from legacy forums. Posted by userX (had 334 views)
- You must be logged in to reply to this topic.