[Mono-winforms-list] DataGridView

Jordi Mas jordi at ximian.com
Tue Jul 26 09:26:53 EDT 2005


El dt 26 de 07 del 2005 a les 15:22 +0200, en/na Pedro Martínez Juliá va
escriure:
> Hi,
> 
> I'm working in DataGridView (related to Summer of Code) and I want to
> know how you think I should implement the scrolling. My fist idea is to
> have one ScrolllableControl inside the DataGridView and use other object
> to host the drawing and to parent the cell editors (such as TextBox).
> 
> I don't know the impact of this implementation to the grdid clients.
> Have you any other idea?

Hello Pedro,

I wrote the Datagrid control that is the grid control in .Net 1.1. I
decided to go handle the scroll myself and do not use the
ScrollableControl class because I think that it brings little benefit to
the needs.

My suggestions are:

a) Write samples to understand exactly all the features that the grid
has. Grids are fairly complex controls and if you miss a property or a
feature that may break your design in a few weeks when you just realise
this new feature.

b) In the DataGrid control in .Net 1.1 the cells are painted using the
paint methods of DataGridColumnStyle derivated classes. You should only
create the editors only when need it. 

c) Look in SVN at the files DataGrid.cs DataGridDrawingLogic.cs located
at mcs/class/Managed.Windows.Forms/System.Windows.Forms to see how the
old DataGrid was implemented. It works pretty well on Win32 but on X11
we still need to do some fixes.

Good luck

Jordi,
-- 
Jordi Mas i Hernàndez - Mono development team - http://www.mono-project.com
Homepage and LiveJournal at http://www.softcatala.org/~jmas




More information about the Mono-winforms-list mailing list