Matrix setValue NullReferenceException

badoqu

Hi experts,


 


I have an issue when trying to insert some data into an existing Matrix.


This is the martix of "Recurring Posting" form look the image attached.


 


Here is my code:


 


Matrix oMatrix = Matrix.GetFromUID(MyForm, "28");

oMatrix.SetValue("7", 0, "230190"); //working

oMatrix.SetValue("7", 1, "320000"); //working

oMatrix.SetValue("9", 0, 50); //Exception here

 


 


The last line make a NullReferenceException saying: "Object reference not set to an instance of an object."


 


It is suppose to write 50 on the first row at the column "Debit" which is column "9" (say the system info while my mouse is one the cell),


 


I try to put a string or a double instead integer but still the same error. 


 


Any idea? I need help..


Paolo Manfrin

I guess you forgot to put that into a strin with "..."


 


oMatrix.SetValue("9", 0, "50"); //Exception here


 


hth


paolo


badoqu

Hi Paolo,


 


Thank you for your answer. I tried that but still get the error.


In the matrix it is a numeric value that is expected.


 


As I said this code was working before :-/ so I don't know what has changed?


 


 


badoqu

No one knows? I'm stuck, I realy need to know how to fill these matrix' cells..


0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post