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.
{
case DataChanged.Modified:
// this.UpdateDataMap(e.Row);
updatedatamap.UpdateMddDataMap(Convert.ToInt32(e.Row.Cells.FromKey("LookupRDBID").Value),
e.Row.Cells.FromKey("MapField").Value.ToString(),
e.Row.Cells.FromKey("WMDvalue").Value.ToString(),
e.Row.Cells.FromKey("VariableText").Value.ToString(), e.Row.Cells.FromKey("ElementName").Value.ToString(),
e.Row.Cells.FromKey("PTKVariable").Value.ToString(), e.Row.Cells.FromKey("CCP").Value.ToString(),
Convert.ToDateTime(e.Row.Cells.FromKey("DateModified").Value), Convert.ToDateTime(e.Row.Cells.FromKey("DateDeleted").Value),
Convert.ToBoolean(e.Row.Cells.FromKey("IsLock").Value), e.Row.Cells.FromKey("MDDFileName").Value.ToString());
case DataChanged.Unchanged:
}
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.
Ok, I found it where it throws the error message.
under this function:
function igtbl_globalMouseMove(evnt){ if(!evnt) evnt=event; if(typeof(igtbl_gridState)!="undefined" && igtbl_gridState) { for(var gId in igtbl_gridState) { var gs = igtbl_gridState[gId]; var scrElem = evnt.srcElement?evnt.srcElement:evnt.target; if(!ig_isAChildOfB(evnt.srcElement,gs.Element)) { if (gs.Element.getAttribute("elementMode")=="resize") <== this is the line where throws the message { if(igtbl_button(gId, evnt)==-1) { igtbl_clearResizeDiv(gs ,evnt, true); } } } } }}
and also after the first error I get another error here:
{.......
{if(g.Events.XmlHTTPResponse[1]==1)
{...............
Any ideas?
Thanks,
Thanks for replying to my post.
I will try your suggestion and will let you. However, I placed a breakpoint on the first line and it seems "e" is null!! It is very odd why it does not set its object.