Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
185
Out of index error
posted

Hi,

I am getting one error ,that is

System.ArgumentOutOfRangeException was caught

  Message="Index was out of range. Must be non-negative and less than the

size of the collection. Parameter name: index"

while loading/assigning datasource to wingrid.Try...catch section is also not able to

catch this particular error.

I have gone through the site

http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=5165

but where  i need to write these methods?

I tried with this code but still error is coming after trying few

 times(50 times) ,It is no so frequent error.

                grdInvestor.BeginUpdate()
             
grdInvestor.SuspendRowSynchronization()
                If grdInvestor.DataSource Is Nothing Then
                    grdInvestor.DataSource = DatabseReturnInvestor
                    grdInvestor.DisplayLayout.Bands(0).Columns("Investor").Width = 350
                    grdInvestor.DisplayLayout.Bands(0).Columns("Fund").Width = 350
                    HideExcelGridColumns(grdInvestor)
                End If
                grdInvestor.ResumeRowSynchronization()
                grdInvestor.EndUpdate()

I am also using some events like

grdInvestor_AfterRowUpdate,

grdInvestor_BeforeEnterEditMode

grdInvestor_DoubleClickRow

grdInvestor_InitializeLayout

grdInvestor_InitializeRow

grdInvestor_Click

I am attaching screen shots for reference.

Thanks in advance.

 

Regards,

Rajesh Kumar