[Mono-winforms-list] DataGrid broken
Hi My old software, Cs-Obexftp, worked like an charme, but, the last code modification of Datagrid has broken it : 30/09/2012 11:31:00: Cannot create a child list for field Table1. at System.Windows.Forms.BindingContext.CreateBindingManager (System.Object data_source, System.String data_member) [0x0006c] in /home/qateam/rpm/BUILD/mono-2.10.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingContext.cs:124 at System.Windows.Forms.BindingContext.get_Item (System.Object dataSource, System.String dataMember) [0x00067] in /home/qateam/rpm/BUILD/mono-2.10.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/BindingContext.cs:100 at System.Windows.Forms.DataGridView.get_DataManager () [0x00029] in /home/qateam/rpm/BUILD/mono-2.10.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:763 at System.Windows.Forms.DataGridView.ClearBinding () [0x00029] in /home/qateam/rpm/BUILD/mono-2.10.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6104 at System.Windows.Forms.DataGridView.ReBind () [0x00018] in /home/qateam/rpm/BUILD/mono-2.10.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:6381 at System.Windows.Forms.DataGridView.set_DataSource (System.Object value) [0x00099] in /home/qateam/rpm/BUILD/mono-2.10.2/mcs/class/Managed.Windows.Forms/System.Windows.Forms/DataGridView.cs:747 at (wrapper remoting-invoke-with-check) System.Windows.Forms.DataGridView:set_DataSource (object) at CsObexFtp.BluetoothAdvertising.InitializeComponent () [0x00811] in /home/eric/Projects/CobexFtp/CobexFtp/cs-obexftp/trunk/Cs-ObexFtp/Cs-ObexFtp/Forms/BluetoothAdvertising.Designer.cs:212 at CsObexFtp.BluetoothAdvertising..ctor () [0xd] in /home/eric/Projects/CobexFtp/CobexFtp/cs-obexftp/trunk/Cs-ObexFtp/Cs-ObexFtp/Forms/BluetoothAdvertising.cs:19 at (wrapper remoting-invoke-with-check) CsObexFtp.BluetoothAdvertising:.ctor () at CsObexFtp.MainForm.bluetoothAdvertisingToolStripMenuItem_Click (System.Object sender, System.EventArgs e) [0x00010] in /home/eric/Projects/CobexFtp/CobexFtp/cs-obexftp/trunk/Cs-ObexFtp/Cs-ObexFtp/Forms/MainForm.cs:1457 The wole code of Cs-obexftp is aviable at sourceforge.net : http://cs-obexftp.svn.sourceforge.net/viewvc/cs-obexftp/trunk/Cs-ObexFtp/ Sorry if i use the mailling list, but cannot remember or retrieve again the good bugzilla place. -- Cordially. Quand le gouvernement viole les droits du peuple, l’insurrection est, pour le peuple et pour chaque portion du peuple, le plus sacré des droits et le plus indispensable des devoirs. ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] DataGrid
Hey, Could you please provide one small sample to reproduce the problem so I can fix it? Everaldo. On Wed, Oct 15, 2008 at 10:15 PM, Vorpal [EMAIL PROTECTED] wrote: mbertoli wrote: Do anyone of you use a DataGrid in your applications? Does it work? I tried various applications on various systems and it never works. I always get the IndexOutOfRangeException when I try to add a new row. Only in the ReportBuilder compiled application founded in the vmware image downloaded from this site I've seen it works. But if I compile the source, it doesn't work. Can anyone help me, please? My DataGridView works with Mono 1.2 or 1.9.1 with a very bad look and I can't click it with good results. With Mono 2.0 It looks a little better but I can't add more than one row because it freezes and after that, I have to close the application. -- View this message in context: http://www.nabble.com/DataGrid-tp18923277p20004857.html Sent from the Mono - WinForms mailing list archive at Nabble.com. ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] DataGrid
Probably it's a regression. Would you mind filling a bug report? This way we can track the error with the details. Carlos. El lun, 11-08-2008 a las 03:41 -0700, mbertoli escribió: Do anyone of you use a DataGrid in your applications? Does it work? I tried various applications on various systems and it never works. I always get the IndexOutOfRangeException when I try to add a new row. Only in the ReportBuilder compiled application founded in the vmware image downloaded from this site I've seen it works. But if I compile the source, it doesn't work. Can anyone help me, please? ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
[Mono-winforms-list] [DataGrid] System.IndexOutOfRangeException: list position
Hi, I have a simple DataGrid in which I load data from a DataSet. Data loading works fine but when I try to add a row I get a MessageBox that tells me to correct the value. Then I get this error: System.IndexOutOfRangeException: list position. Can anyone help me? Thanks, Michele Mono 1.9.1 / Suse 10.3 -- View this message in context: http://www.nabble.com/-DataGrid--System.IndexOutOfRangeException%3A-list-position-tp18908287p18908287.html Sent from the Mono - WinForms mailing list archive at Nabble.com. ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] [DataGrid] System.IndexOutOfRangeException: list position
Hey, If it works on .net, and not in mono, please fill a bug report at http://mono-project.com/Bugs in the System.Windows.Forms section, so we can fix it. Thanks, Carlos. El dom, 10-08-2008 a las 00:08 -0700, mbertoli escribió: Hi, I have a simple DataGrid in which I load data from a DataSet. Data loading works fine but when I try to add a row I get a MessageBox that tells me to correct the value. Then I get this error: System.IndexOutOfRangeException: list position. Can anyone help me? Thanks, Michele Mono 1.9.1 / Suse 10.3 ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
[Mono-winforms-list] DataGrid ctor: OutOfMemoryException
Hi, with Mono 1.2.1 (using Windows XP), I tried to create a DataGrid control. My code looks like this: public Form1() { DataGrid grd = new DataGrid(); ((System.ComponentModel.ISupportInitialize)(grd)).BeginInit(); this.Controls.Add(grd); ((System.ComponentModel.ISupportInitialize)(grd)).EndInit(); } The following exception is thrown when the program is started with mono myapp.exe (executing the program with MS.NET does not cause any errors): --- Unhandled Exception: System.OutOfMemoryException: Out of memory. at System.Drawing.GDIPlus.CheckStatus (Status status) [0x0] at System.Drawing.Graphics.DrawImage (System.Drawing.Image image, Rectangle destRect, Int32 srcX, Int32 srcY, Int32 srcWidth, Int32 srcHeight, GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes imageAttr) [0x0] at (wrapper remoting-invoke-with-check) System.Drawing.Graphics:DrawImage (System.Drawing.Image,System.Drawing.Rectangle,int,int,int,int,System.Drawing.GraphicsUnit,System.Drawing.Imaging.ImageAttributes) at System.Drawing.Bitmap.MakeTransparent (Color transparentColor) [0x0] at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:MakeTransparent(System.Drawing.Color) at System.Windows.Forms.DataGrid..ctor () [0x0] at (wrapper remoting-invoke-with-check) System.Windows.Forms.DataGrid:.ctor () at myapp.UI.frmMain..ctor () [0x0] at (wrapper remoting-invoke-with-check) myapp.UI.frmMain:.ctor () at myapp.Program.Main () [0x0] --- Other controls like textboxes, combos, labels, listviews, etc. are working with Mono without any error. The code's compiled without errors with mcs. Does anybody know what I am doing wrong? :) Regards, Maurice -- View this message in context: http://www.nabble.com/DataGrid-ctor%3A-OutOfMemoryException-tf2746878.html#a7663672 Sent from the Mono - WinForms mailing list archive at Nabble.com. ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
[Mono-winforms-list] DataGrid regression in 1.1.16
Hi! Does anybody from developers test DataGrid under Mono for windows? It does not work correct on Mono 1.1.16 for windows: 1) When i want to insert new record and set focus on last row on the grid than application terminates immediately (on 1.1.15 it doesn't terminate) 2) Data changing not works: after editing of any DataGrid cell value and changing focus on other cell or other controll DataGrid loose just-entered value and replace it by old one. -- View this message in context: http://www.nabble.com/DataGrid-regression-in-1.1.16-tf1919268.html#a5254265 Sent from the Mono - WinForms forum at Nabble.com. ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] datagrid layout patch
El dj 11 de 05 del 2006 a les 15:24 -0400, en/na Chris Toshok va escriure: The initial layout of the datagrid (CalcGridAreas in particular) ends up recursively calling itself (on one test it was being invoked 5 or 6 times.) You can see this happening with a large datagrid by watching the vertical scrollbar's slider change size as it lays out. This patch calculates the layout/positioning of everything in a single pass, which speeds things up quite a bit. Chris Chris, your patch looks to me. Feel free to commit it. Thanks. Jordi, ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
[Mono-winforms-list] datagrid scrolling patch (fix for bug 78011)
The datagrid patch is pretty simple - call XplatUI.ScrollWindow once, and don't call invalidate when scrolling, as the generated exposes will cause us to redraw the areas that need it. Turns out removing the rectangle code made clear the methods could be substantially simplified, so I went ahead and did that too. This was all that was necessary to get vertical scrolling to be fast. The theme change keeps us from redrawing the entire row whenever a portion of it is exposed (which makes horizontal scrolling as fast as vertical.) Chris Index: System.Windows.Forms/DataGrid.cs === --- System.Windows.Forms/DataGrid.cs (revision 60633) +++ System.Windows.Forms/DataGrid.cs (working copy) @@ -1005,7 +1005,7 @@ } protected virtual void CancelEditing () - { + { if (current_cell.ColumnNumber CurrentTableStyle.GridColumnStyles.Count) { CurrentTableStyle.GridColumnStyles[current_cell.ColumnNumber].Abort (current_cell.RowNumber); } @@ -1969,7 +1969,7 @@ if (source != null source as IListSource != null source as IList != null) { throw new Exception (Wrong complex data binding source); } - + current_cell = new DataGridCell (); datasource = source; DisconnectListManagerEvents (); @@ -1985,7 +1985,7 @@ } private void SetNewDataSource () - { + { if (ListManager != null TableStyles[ListManager.ListName] == null) { current_style.GridColumnStyles.Clear (); current_style.CreateColumnsForTable (false); @@ -2132,103 +2132,47 @@ private void ScrollToColumnInPixels (int pixel) { - Rectangle invalidate = new Rectangle (); - Rectangle invalidate_column = new Rectangle (); + int pixels; if (pixel horz_pixeloffset) { // ScrollRight -int pixels = pixel - horz_pixeloffset; - -horz_pixeloffset = horiz_scrollbar.Value = pixel; -grid_drawing.UpdateVisibleColumn (); +pixels = -1 * (pixel - horz_pixeloffset); + } + else { +pixels = horz_pixeloffset - pixel; + } -// Columns header -invalidate_column.X = grid_drawing.ColumnsHeadersArea.X + grid_drawing.ColumnsHeadersArea.Width - pixels; -invalidate_column.Y = grid_drawing.ColumnsHeadersArea.Y; -invalidate_column.Width = pixels; -invalidate_column.Height = grid_drawing.ColumnsHeadersArea.Height; -XplatUI.ScrollWindow (Handle, grid_drawing.ColumnsHeadersArea, -pixels, 0, false); - -// Cells -invalidate.X = grid_drawing.CellsArea.X + grid_drawing.CellsArea.Width - pixels; -invalidate.Y = grid_drawing.CellsArea.Y; -invalidate.Width = pixels; -invalidate.Height = grid_drawing.CellsArea.Height; + Rectangle area = grid_drawing.CellsArea; - -if (columnheaders_visible == true) { - invalidate.Y -= grid_drawing.ColumnsHeadersArea.Height; - invalidate.Height += grid_drawing.ColumnsHeadersArea.Height; -} - -XplatUI.ScrollWindow (Handle, grid_drawing.CellsArea, -pixels, 0, false); -Invalidate (invalidate_column); -Invalidate (invalidate); + horz_pixeloffset = pixel; + grid_drawing.UpdateVisibleColumn (); + if (columnheaders_visible == true) { +area.Y -= grid_drawing.ColumnsHeadersArea.Height; +area.Height += grid_drawing.ColumnsHeadersArea.Height; + } - } else { -int pixels = horz_pixeloffset - pixel; -Rectangle area = grid_drawing.CellsArea; - -horz_pixeloffset = horiz_scrollbar.Value = pixel; -grid_drawing.UpdateVisibleColumn (); - -// Columns header -invalidate_column.X = grid_drawing.ColumnsHeadersArea.X; -invalidate_column.Y = grid_drawing.ColumnsHeadersArea.Y; -invalidate_column.Width = pixels; -invalidate_column.Height = grid_drawing.ColumnsHeadersArea.Height; -//XplatUI.ScrollWindow (Handle, grid_drawing.ColumnsHeadersArea, pixels, 0, false); - -// Cells -invalidate.X = grid_drawing.CellsArea.X; -invalidate.Y = grid_drawing.CellsArea.Y; -invalidate.Width = pixels; -invalidate.Height = grid_drawing.CellsArea.Height; - -if (columnheaders_visible == true) { - invalidate.Y -= grid_drawing.ColumnsHeadersArea.Height; - invalidate.Height += grid_drawing.ColumnsHeadersArea.Height; - area.Y -= grid_drawing.ColumnsHeadersArea.Height; - area.Height += grid_drawing.ColumnsHeadersArea.Height; -} - -XplatUI.ScrollWindow (Handle, area, pixels, 0, false); -Invalidate (invalidate); - } - + XplatUI.ScrollWindow (Handle, area, pixels, 0, false); } private void ScrollToRow (int old_row, int new_row) { - Rectangle invalidate = new Rectangle (); - + int pixels; + if (new_row old_row) { // Scrolldown -int scrolled_rows = new_row - old_row; -int pixels = scrolled_rows * RowHeight; -Rectangle rows_area = grid_drawing.CellsArea; // Cells area - partial rows space -rows_area.Height = grid_drawing.CellsArea.Height - grid_drawing.CellsArea.Height % RowHeight; -
Re: [Mono-winforms-list] datagrid scrolling patch (fix for bug 78011)
El dv 12 de 05 del 2006 a les 11:31 -0400, en/na Chris Toshok va escriure: The datagrid patch is pretty simple - call XplatUI.ScrollWindow once, and don't call invalidate when scrolling, as the generated exposes will cause us to redraw the areas that need it. Turns out removing the rectangle code made clear the methods could be substantially simplified, so I went ahead and did that too. This was all that was necessary to get vertical scrolling to be fast. The theme change keeps us from redrawing the entire row whenever a portion of it is exposed (which makes horizontal scrolling as fast as vertical.) Chris Chris, Have you tried the patch on Win32 also? At the time that I wrote that the were diferences in the way what ScrollWindows functions XplatUI worked for diferent platforms and that could not be archived. If it works on both platforms, feel free to commit. Thanks, Jordi, ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list
Re: [Mono-winforms-list] Datagrid TableStyle error
El dc 26 de 04 del 2006 a les 10:52 +0200, en/na Bartosz Mosica va escriure: Hi! I've started porting some bigger application to mono, I mean compiling using MS .NET and then run under mono, and I've noticed incorrect behavior of DataGrid. I'm using current stable version of mono 1.1.15, I do not know if it is fixed in development branch. Look at code: Yes, this a bug. Please, fill up a bug report at http://bugzilla.ximian.com and assign it to me ([EMAIL PROTECTED]) and I'll look into it. Please, provide also a fully functional simple code that can be used to reproduce the problem. Thanks, Jordi, ___ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list