Please let me know how to download the uploaded file.
My requirement is:
Displaying file name in the list grid
Whenever user click on the download icon or button, file will open in the available editor (e.g. doc file will open in MS Office word, image will open in MS Paint etc).
When you set a field type of “binary” you’ll see SmartClient automatically show appropriate download icons in the field. At that point you are responsible for placing an InputStream into dsResponse.data under the fieldName of the binary field (“file” in your case) when the download operation occurs.
When posting JavaScript errors, always post the stack trace from Internet Explorer. Due to all the “anonymous” functions in the stack (a flaw in some versions of Firebug) your stack trace is useless.
I have checked in the Smart Client console, using javascript:isc.showConsole() and getting following exception where I call removeSelectedData() on the listGrid
12:52:09.281:MUP5:WARN:Log:Error:
‘Object doesn’t support this property or method’
in https://localhost:7005/ER3/isomorphic/system/modules/ISC_Grids.js
at line 45 List.removeList(_1=>Array[1])
Canvas.removeSelectedData(_1=>undef, _2=>undef)
anonymous(Obj, undef)
“this.parentElement.parentElement.parentElement.parentElement.attachmentGrid.listGrid.removeSelectedData ();”
StatefulCanvas.handleActivate(_1=>Obj, _2=>undef)
StatefulCanvas.handleClick(_1=>Obj, _2=>undef)
EventHandler.bubbleEvent(_1=>[ImgButton ID:isc_ImgButton_237], _2=>“click”, _3=>undef, _4=>undef)
EventHandler.handleClick(_1=>[ImgButton ID:isc_ImgButton_237], _2=>undef) EventHandler.$k5(_1=>[object Event], _2=>undef)
EventHandler.handleMouseUp(_1=>[object Event], _2=>undef)
EventHandler.dispatch(_1=>EventHandler.handleMouseUp(), _2=>[object Event])
anonymous(event=>undef)
“var returnVal=arguments.callee.$ch.isc.EH.dispatch(arguments.callee.$j2,event);return returnVal;”
This suggests that you have set saveLocally:true on a databound ListGrid when you are using a ResultSet / have called fetchData(). This setting is invalid. Either setSaveLocally:false and allow the grid to issue “remove” DataSource requests, or use an Array as the dataset, which will allow local changes.
Now, after calling removeSelectedData() I am getting the request on server and am able to delete the attachment, but it is not refreshing the grid after that.
Even I tried to write a callback in removeSelectedData() function, but that callback is also not getting called.
In my DMI I am calling dsResponse.setSuccess() also