The subject says it all :) I have a GridBinaryImageColumn in a RadGrid as:
I'm using code-behind and Entity Framework and want to take the binary content of the selected file and set that to the appropriate entity property (which is of course byte).
How? All the samples I can find are declarative or not quite
what I want. Here's an example of where I'd like to place such functionality:
var editedItem = e.Item
var hashTable =
// Simpler form of access naturally won't work.
// I KNOW I can't access the content like this:
// this.EntityBinaryContent = hashTable["BinaryContent"] == null
// ? null
// : SomeUtility.ConvertToBytes(hashTable["BinaryContent"]);
// But at this stage, with what I have to work with (e) etc.
// How can I easily get hold of the upload bytes?
Edit: Should mention the intention is that the binary data goes into the database and the file is never saved to a file system. So, I can't work with an uploaded file as there won't be one.