Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'

I've encountered this error with the Aspose Grid control if I drag a column all the way to the left where it disappears, once you do this with the last column visible, you'll receive the error listed in the subject line.

I've been able to reproduce it on a test application, let me know if you are unable to reproduce.

Hi,

We have tested your scenario a bit but could not find the issue, Please post your sample project with screen shots (to give the complete details of the steps involved (if possible)) here, we will check your issue soon.


Thank you.

On the column header bar, click on the line between A & B, hold down the mouse and drag it all the way to the left where column A disappears. Do the same thing with the line to the right of Column B (should be the only visible column). Once you drag it all the way to the left and release the mouse, you'll get this error.

If you are unable to reproduce it, please give me a way to call and I'll walk you through it.

It's possible the version I'm using is old and maybe this is fixed now.

Hi,

Thanks for providing us further details.

Well, I tried your scenario using the latest version i.e…, Aspose.Cells.GridDesktop v2.0.1.31 and it works fine. I think there might be such issue in older version of the product which should be fixed in the latest version.

So, we recommend you to install the latest version of Aspose.Cells for .NET in which we have combinded older Aspse Grid suite to it: http://www.aspose.com/community/files/51/file-format-components/aspose.cells-for-.net-and-java/entry195573.aspx
the installer will install three components on your machine, Aspose.Cells.dll, Aspose.Cells.GridDesktop and Aspose.Cells.GridWeb. Please get the latest build (Aspose.Cells.GridDesktop) from your installation path, i.e…, “\Program Files\Aspose\Aspose.Cells for .NET\Bin\Net1.0” and try it.

Also, just make sure that you have already read the document on how to upgrade from Aspose.Grid.Desktop to Aspose.Cells.GridDesktop control: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net/upgrade-from-aspose-grid-desktop-to-aspose-cells-griddesktop-control.html

Kindly let us know if you still find the issue, we will be glad to sort it out soon.

Thank you.

The error has gone away but I have a couple of questions about the new Aspose.Cells.GridDesktop.

Something has changed in the way the cell borders are colored. It now appears as though some cells are merged without any border. I have not changed a thing in my code regarding this except to use the new Aspose.Cells.GridDesktop instead of Aspose.Grid.Desktop.

Also, is there a way to not allow the user to drag a column to the left and make it disappear? It seems like once I do that, I cannot get it back to being visible.

Hi,

Thanks for your feedback.

Something has changed in the way the cell borders are colored. It
now appears as though some cells are merged without any border. I have
not changed a thing in my code regarding this except to use the new
Aspose.Cells.GridDesktop instead of Aspose.Grid.Desktop.

Well, yes, you don’t really need to change anything in the code except the referenced namespace name. For your info, when you fill some color to a range of cells, it
will look like some cells are merged with some color, but actually all
the cells in the range share the same shading color including cells
borders/grid lines color and are separated. This behavior is same as MS Excel. I think you may explicitly apply/set border colors to those cells in the range. Anyways, we are not completely sure about your actual issue, could you create a simple application, zip it and post us here to show the issue, we will check it soon.


Also, is there a way to not allow the user to drag a column to the left and make it disappear? It seems like once I do that, I cannot get it back to being visible.

Alright, we will check the feasibility if we can support according to MS Excel standard or your need. We will get back to you soon.

Thank you.

In Excel, if you drag column B over to column A, you're still able to drag it back to the right and make it visible.

When I do this in the sample application I attached earlier, it disappears and I can't get it back.

I've also tried the same thing with the new Aspose.Cells and I'm getting the same result.

Hi,

Yes, this is how MS Excel behaves. We will check the feasibility if we can support the feature (i.e…, drag the columns back to their original state). We will get back to you soon.

Thank you.

Hi,

Please try the attached version Aspose.Cells.GridDesktop v2.0.1.34, we have enhanced the draging feature, now you can drag the columns back to their original states similar to MS Excel.

Thank you.