Forum  General Visual ...  Visual WebGui v...  Another DataGridView error
Previous Previous
 
Next Next
New Post 12/28/2011 5:44 AM
Unresolved
  dleland
531 posts
www.kadant.com
1st Level Poster


Another DataGridView error 
Modified By dleland  on 12/28/2011 9:52:46 AM)

We are getting the following error when clicking on a DataGridViewLinkColumn in a DataGridView that has been programatically filled. I have a very simply application that I can send that demonstrates this error.

The error also occurs when simply clicking the arrows at the bottom of the DataGridView to go to a different page.  The error is definitely related to the DataGridViewLinkColumn because when I change the column to a regular text column, the errors go away.

Dave
(VS 2010, .NetHTML 6.4 beta2b)

Server Error in '/' Application.
--------------------------------------------------------------------------------

Specified argument was out of the range of valid values.
Parameter name: rowIndex
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: rowIndex

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: rowIndex]
Gizmox.WebGUI.Forms.DataGridView.SetSelectedCellCore(Int32 intColumnIndex, Int32 intRowIndex, Boolean blnSelected, Boolean blnClientSource) +336
Gizmox.WebGUI.Forms.DataGridView.RemoveIndividuallySelectedCells(Int32 intColumnIndexException, Int32 intRowIndexException, Boolean blnClientSource) +277
Gizmox.WebGUI.Forms.DataGridView.RemoveIndividuallySelectedCells(Int32 intColumnIndexException, Int32 intRowIndexException) +42
Gizmox.WebGUI.Forms.DataGridView.ClearSelection(Int32 intColumnIndexException, Int32 intRowIndexException, Boolean blnSelectExceptionElement, Boolean blnClientSource) +985
Gizmox.WebGUI.Forms.DataGridView.ClearSelection(Int32 intColumnIndexException, Int32 intRowIndexException, Boolean blnSelectExceptionElement) +47
Gizmox.WebGUI.Forms.DataGridView.SetAndSelectCurrentCellAddress(Int32 intColumnIndex, Int32 intRowIndex, Boolean blnSetAnchorCellAddress, Boolean blnValidateCurrentCell, Boolean blnThroughMouseClick, Boolean blnClearSelection, Boolean blnForceCurrentCellSelection) +192
Gizmox.WebGUI.Forms.DataGridView.MakeFirstDisplayedCellCurrentCell(Boolean blnIncludeNewRow) +206
Gizmox.WebGUI.Forms.DataGridView.OnEnter(EventArgs e) +370
Gizmox.WebGUI.Forms.Control.NotifyEnter() +49
Gizmox.WebGUI.Forms.ContainerControl.UpdateFocusedControl() +347
Gizmox.WebGUI.Forms.ContainerControl.AssignActiveControlInternal(Control objControl) +120
Gizmox.WebGUI.Forms.ContainerControl.ActivateControlInternal(Control objControl, Boolean blnOriginator) +240
Gizmox.WebGUI.Forms.ContainerControl.Gizmox.WebGUI.Forms.IContainerControl.ActivateControl(Control objControl) +38
Gizmox.WebGUI.Forms.Control.FireEvent(IEvent objEvent) +1148
Gizmox.WebGUI.Forms.DataGridView.FireEvent(IEvent objEvent) +245
Gizmox.WebGUI.Forms.RegisteredComponent.Gizmox.WebGUI.Common.Interfaces.IEventHandler.FireEvent(IEvent objEvent) +59
Gizmox.WebGUI.Server.Context.ProcessEvent(Int64 lngTimeMarker, IEvent objEvent) +319
A.c4d3cdb893b7f640a5aa2a40bfe2211b1.ProcessRequest(HostContext objHostContext) +1694

[HttpException (0x80004005): Specified argument was out of the range of valid values.
Parameter name: rowIndex]
A.c4d3cdb893b7f640a5aa2a40bfe2211b1.HandleApplicationException(Exception objException, HostContext objHostContext) +190
A.c4d3cdb893b7f640a5aa2a40bfe2211b1.ProcessRequest(HostContext objHostContext) +1733

[HttpException (0x80004005): Specified argument was out of the range of valid values.
Parameter name: rowIndex]
A.c4d3cdb893b7f640a5aa2a40bfe2211b1.ProcessRequest(HostContext objHostContext) +4321
Gizmox.WebGUI.Hosting.HostHttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +112
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; WebGUI Version:4.0.30319.237

 
New Post 12/30/2011 11:44 AM
  palli
11838 posts
1st Level Poster




Re: Another DataGridView error 

Hi Dave,

I am also unable to reproduce this error using the following code:

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DataGridView1.UseInternalPaging = True
        DataGridView1.ItemsPerPage = 5
 
        DataGridView1.Columns.Add("FirstCol", "First")
        DataGridView1.Columns.Add("SecondCol", "Second")
        Dim dlc As DataGridViewLinkColumn = New DataGridViewLinkColumn()
        dlc.Name = "LinkCol"
        DataGridView1.Columns.Add(dlc)
 
        For i As Integer = 1 To 10
            DataGridView1.Rows.Add(i.ToString(), i.ToString(), "http://www.google.com")
        Next
 
    End Sub

Please send the sample application to support, following the usual procedures, as there must be some details that I miss.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/30/2011 12:15 PM
  dleland
531 posts
www.kadant.com
1st Level Poster


Re: Another DataGridView error 

I have sent a sample application that will show the error. Please note that you will need to change the SQL Server Database in the program to one that you have access to. The program doesn't actually read anything from any tables in the database though.

Dave
 

 
New Post 12/31/2011 3:50 AM
  palli
11838 posts
1st Level Poster




Re: Another DataGridView error 

Hi Dave,

This problem has already been reported in an open tracker entry here.

Your version of it is slightly different as you are using a Link column, instead of ComboBox, which was reported in the tracker entry, but I confirmed the problem is the same by trying this on the second column instead of the first.

The fact that it works that way, may help you building a workaround, as you may be able to add a dummy column as the first column and then replace the second column instead of the first, and then the problem does not show.

Thanks for the report and hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/31/2011 9:18 AM
  dleland
531 posts
www.kadant.com
1st Level Poster


Re: Another DataGridView error 

Palli:

Thanks for the info.  Unfortunately, the workaround would not be practical for us.  We have a LOT of DataGridViews where we use the same methodology - a DataGridViewLinkColumn as the first column in the grid.  We will have to hold off upgrading to 6.4 until this is fixed.  Any possibility of checking to see if the fix for this might be included in the next release (end of January)?

Dave

 
Previous Previous
 
Next Next
  Forum  General Visual ...  Visual WebGui v...  Another DataGridView error
Azure banner
.NET Web, Cloud and Mobile application delivery platform | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2011 Visual WebGui®       Visual WebGui weblog on ASP.NET Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS