Skip to content

ErcanOPAK.com

  • ASP.Net WebForms
  • ASP.Net MVC
  • C#
  • SQL
  • MySQL
  • PHP
  • Devexpress
  • Reportviewer
  • About
ASP.Net MVC / ASP.Net WebForms / Devexpress / HTML

How to Solve The ‘Object reference not set to an instance of an object’ error in Batch Edit mode for ASPxGridView

- 01.10.19 | 22.11.19 - ErcanOPAK

Image result for object reference not set to an instance of an object

The issue occurs in Batch Edit Mode, because in this mode an empty invisible row is created and used for further grid editing. Since the Eval method returns a value type of an object, your attempt to call the ToString() method to the null value can lead to an exception.
If you remove this conversion and use <%# Eval(“A”)%> then you will solve the problem.

Related posts:

Check Checkbox in GridView when Database has value "True"
Devexpress ASPxGridview Column Grouping in Code
Using View Model to pass Multiple Models in Single View in MVC
How to use Stopwatch in C#
How to refresh a DIV content with Javascript
Post Views: 154

Post navigation

How to Alter a Computed Column in SQL?
How to set delivery format while using SMTP client in C#?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

April 2021
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  
« Jan    

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (243)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (194)
  • How to make some specific word(s) Bold or Underline in ReportViewer (187)
  • How to solve “Response.Redirect cannot be called in a Page callback” for DevExpress Components (183)
  • Confirm before process with ASPxButton in Devexpress (172)
  • ASPxGridView – Disable CheckBox based on condition in GridViewCommandColumn (170)
  • Find numbers with more than two decimal places in SQL (168)
  • Devexpress ASPxGridview Column Grouping in Code (164)
  • DATEADD Function in SQL (163)
  • Tense Changes When Using Reported Speech (160)

Recent Posts

  • How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL
  • How to auto-scroll or manually to end of div when data is added
  • Filter Rows By Max Date in SQL
  • How to Validate a DateTime in C#?
  • Convert comma separated string into a List in C#
  • Converting a List to a comma separated string in C#
  • How to add placeholder to Multiple Selection DropDownList in Asp.Net MVC
  • How to use toFixed() for Float numbers in Javascript
  • Convert List to List in one line in C#
  • How to use column search in datatable when responsive is false

Recent Posts

  • How to check for ‘IS NOT NULL’ And ‘IS NOT EMPTY’ string in SQL
  • How to auto-scroll or manually to end of div when data is added
  • Filter Rows By Max Date in SQL
  • How to Validate a DateTime in C#?
  • Convert comma separated string into a List in C#

Most Viewed Posts

  • Get the First and Last Word from a String or Sentence in SQL (243)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (194)
  • How to make some specific word(s) Bold or Underline in ReportViewer (187)
  • How to solve “Response.Redirect cannot be called in a Page callback” for DevExpress Components (183)
  • Confirm before process with ASPxButton in Devexpress (172)

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter

powered by XBlog Plus WordPress Theme