Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

datagridtextboxcolumn throws error on string over 330

$
0
0

I am new to the forum and i working on something that i cannot seem to solve. my textboxcolumn throwns and nullreference error whenever i update with more that 330 characters. my maxlength is set to 2000 everywhere else. any idea on what could have cause it be behaving like this ?

 Try
                If e.Data.Contains("ModifiedRows") = False Then Exit Sub
                tempTable = CType(e.Data("ModifiedRows"), MaintenanceDataSet.WebsitePageDownloadDataTable)
                If tempTable.Rows.Count > 0 Then
                    RemoveHandler maintenanceDataGridView.RowValidated, AddressOf maintenanceDataGridView_RowValidated
                    Processor.Data.WebsitePageDownload.LoadingTable = True
                    Processor.Data.WebsitePageDownload.Merge(tempTable, False)
                    Processor.Data.WebsitePageDownload.LoadingTable = False
                    Processor.Data.WebsitePageDownload.RejectChanges()
                    AddHandler maintenanceDataGridView.RowValidated, AddressOf maintenanceDataGridView_RowValidated


                    Processor.Data.WebsitePageDownload.Merge(tempTable)

                    'For Each row As DataRow In tempTable.Rows
                    '    If row.RowError IsNot Nothing AndAlso row.RowError.Length > 0 Then
                    '        MsgBox(row.RowError)
                    '    End If

                    '    ' MsgBox(row("URL").ToString)

                    'Next

                    'MsgBox(Processor.Data.WebsitePageDownload.Columns("defaultstatusid").MaxLength)
                    Processor.Data.WebsitePageDownload.AcceptChanges()
                End If
            Catch ex As Exception
                MsgBox(ex.Message.ToString)
            End Try

here is the code error gets thrown on the acceptchanges()


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>