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
865
ultrawebgrid_Updaterow error
posted

Hi,

 I have added an updaterow method to my webgrid as it was instrcuted in this base knowledge http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9966 . When I run my application, it throws the following message:

Object reference not set to an instance of an object.

Can you help please? Here is my code:protected void UltraWebGrid1_UpdateRow(object sender, RowEventArgs e)

{

switch (e.Row.DataChanged)

{

case DataChanged.Modified:

// this.UpdateDataMap(e.Row);

DimensionBLL updatedatamap = new DimensionBLL();

updatedatamap.UpdateMddDataMap(Convert.ToInt32(e.Row.Cells.FromKey("LookupRDBID").Value),

e.Row.Cells.FromKey("MapTable").Value.ToString(),

e.Row.Cells.FromKey("MapField").Value.ToString(),

Convert.ToInt32(e.Row.Cells.FromKey("MapLen").Value),

e.Row.Cells.FromKey("WMDvalue").Value.ToString(),

Convert.ToInt32(e.Row.Cells.FromKey("Surveycode").Value), e.Row.Cells.FromKey("VariableName").Value.ToString(),

e.Row.Cells.FromKey("VariableText").Value.ToString(), e.Row.Cells.FromKey("ElementName").Value.ToString(),

Convert.ToInt32(e.Row.Cells.FromKey("VariableID").Value), Convert.ToInt32(e.Row.Cells.FromKey("Response").Value),

e.Row.Cells.FromKey("PTKVariable").Value.ToString(), e.Row.Cells.FromKey("CCP").Value.ToString(),

e.Row.Cells.FromKey("FixValue").Value.ToString(), Convert.ToDateTime(e.Row.Cells.FromKey("DateAdded").Value),

Convert.ToDateTime(e.Row.Cells.FromKey("DateModified").Value), Convert.ToDateTime(e.Row.Cells.FromKey("DateDeleted").Value),

Convert.ToBoolean(e.Row.Cells.FromKey("IsValid").Value), Convert.ToBoolean(e.Row.Cells.FromKey("Verified").Value),

Convert.ToBoolean(e.Row.Cells.FromKey("IsLock").Value), e.Row.Cells.FromKey("MDDFileName").Value.ToString());

break;

case DataChanged.Unchanged:

break;

}

}

Parents
No Data
Reply
  • 28464
    posted

    Hello, 

    Thanks for writing. I believe it's a bit hard to figure out the exact reason for this error, because it may occur on any line. I have a couple of suggestions though 

    1) Place a breakpoint on the first line of the method and start debugging - this way you will get the exact line where the problem exists and it will be much easier to figure out what is going on

    2) Check out the complete stacktrace of the error (you need to be in debug mode for that) - it will typically show the line it occurs on

    Hope this helps. 

Children