Hi,
I am implementing batchUploader that uploads a CSV having fields name,type. It has client side validation on type field. The Grid gets populated with validation errors. Now my requirement is to provide a text box and a replace button to replace all the failed values with the correct one. When I iterated the list grid records for their attributes I get null for the failed cell values even if the value is visible on screen (with validation failed). So I am unable to proceed with replacing the records with the new value.
So my question is how can I get the value of a validation failed cell ?
I tried to take a hidden field in DS.xml to hold the value from "type" field, so that I can do the calculation based on the hidden field. I tried the below in DS.xml :
This also does not work because batchuploader is only considering the columns that are available in CSV file.
Any suggestions on this? How should I read/get the value of a cell for which the validation has failed ,So that I can replace then with valid values?
Thanks in advance.
Regards,
Preeti
I am implementing batchUploader that uploads a CSV having fields name,type. It has client side validation on type field. The Grid gets populated with validation errors. Now my requirement is to provide a text box and a replace button to replace all the failed values with the correct one. When I iterated the list grid records for their attributes I get null for the failed cell values even if the value is visible on screen (with validation failed). So I am unable to proceed with replacing the records with the new value.
So my question is how can I get the value of a validation failed cell ?
Code:
for (ListGridRecord record : batchUploader.getGrid().getRecords()) { for(String attr : record.getAttributes()){ GWT.log(attr+" = "+record.getAttribute(attr)); //I always get null here for cells for which validation has failed. }
Code:
<field name="type" type="text" title="Type" length="128" /> <field name="typeHidden" type="text" displayField="type"/>
Any suggestions on this? How should I read/get the value of a cell for which the validation has failed ,So that I can replace then with valid values?
Thanks in advance.
Regards,
Preeti
Comment