hello
can you help me!
I have an igGrid with updating feature and I have 2 hidden column.
on event editRowEnded I want to set cell value for that 2 hidden column but I can do it.
I recieve an error "The specified record or property was not found. Verify the criteria for your search and adjust them if necessary."
I'm using infragistics 15.2 build 2146
How can i fix this issue?
thank you very much!
Hello Cuong,
Thank you for your code snippet.
I created a small sample using your code. I tried achieving your requirement using setCellValue method. This method sets a cell value for specified cell. It also creates a transaction and updates UI. The value is successfully changed and afterwards when column is hidden there is no exception thrown.
I am attaching my sample for your reference. Please test it on your side and let m know what is the result. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me along with steps to reproduce. Having a working sample on my side that reproduces the issue is going to be very helpful for finding the root cause for this matter.
Looking forward to hearing from you.
thank you very much for your helper
here is my code from your sample code
$(function () { $("#grid").igGrid({ columns: [ { headerText: "ID", key: "ProductID", dataType: "number", width:"50px" }, { headerText: "Product Name", key: "Name", dataType: "string", width:"200px", hidden: false }, { headerText: "Make Flag", key: "MakeFlag", dataType: "bool", width:"80px" }, { headerText: "Sell Start Date", key: "SellStartDate", dataType: "date", width:"350px" }, { headerText: "Price", key: "ListPrice", dataType: "number", width:"100px" }, ], autoGenerateColumns: false, autofitLastColumn : true, autoCommit:true, dataSource: adventureWorks , width: "1000px", height: "600px", primaryKey: "ProductID", features: [ { name: "Updating", editRowEnding: function(evt, ui){ $.ajax({ url: "http://www.igniteui.com/data-files/adventureworks.min.js", }).done(function(data) { ui.values["Name"] = "NEW VALUE"; }); } }] }); });
the cell was not changed after the ajax request was completed
if i used the setcellvalue method then it works ok. but when i hide that column. it threw error "The specified record or property was not found. Verify the criteria for your search and adjust them if necessary."
can you give me some solution to resolve this problem?
thanks you very much!
Thank you for getting back to me.
In order to ensure that your issues is addressed correctly I will need a small isolated sample where this issue is reproducible. Please provide me an isolated, ready to run sample which replicates the behavior that you are experiencing and I would be glad to help you with this matter. Alternatively, you could modify my sample according to your scenario. This going to be highly appreciated and will help me provide you with solution sooner.
because i have an ajax function within the event. so after the ajax function completed. i set value for coulmn. it throws that error
Thank you for posting in our community.
What I can suggest for achieving your requirement is modifying the value for the desired hidden column via using values collection in the editRowEnding event. For example:
$("#grid").igGrid({ columns: [ { headerText: "ID", key: "ProductID", dataType: "number", width:"50px" }, { headerText: "Product Name", key: "Name", dataType: "string", width:"200px" }, { headerText: "Make Flag", key: "MakeFlag", dataType: "bool", width:"80px" }, { headerText: "Sell Start Date", key: "SellStartDate", dataType: "date", width:"350px" }, { headerText: "Price", key: "ListPrice", dataType: "number", width:"100px" }, ], autoGenerateColumns: false, autofitLastColumn : true, autoCommit:true, dataSource: adventureWorks , width: "600px", height: "600px", primaryKey: "ProductID", features: [ { name: "Updating", editRowEnding: function(evt, ui){ ui.values["Name"] = "NEW VALUE"; } }, { name: "Hiding", columnSettings: [ { columnKey: "Name", hidden: true } ] } ] });
I am attaching a small sample illustrating my suggestion for your reference. In my sample "Name" column is initially hidden. When a row is modified in the editRowEnding event handler I am setting a value for this hidden column. Afterwards, I am showing this column and the value is successfully changed.
Please have a look at my sample. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify my sample and send it back to me along with steps to reproduce and I will investigate this matter further.
Please feel free to continue sending updates to this case at any time.