I have a RadGrid that I am using for website users to upload photos and related information.I am using Asp.Net membership services to identify users, and have the database configured to use the UserID (a GUID value) as the foreign key so that uploaded photos are tied to the user who uploaded them.
The grid is working without the foreign key, images being uploaded and displaying, but I have two issues/questions.
(1) When the user edits an image, if the image (or another image) is not selected in the GridBinaryImageColumn then the existing image is deleted (or overwritten with null). What I'd like to have happen is that if no image is selected, I'd like to leave the existing image there.
(2) On insert, I'd like to have the UserID saved to the appropriate column in the SQL table, but I don't want to display it. Once the user is logged in then the UserID is stored in a session variable, but what I want to do is save the UserID value to the appropriate column on an insert. I don't need to worry about it on an update.
Thanks in advance for any insight.
The grid is working without the foreign key, images being uploaded and displaying, but I have two issues/questions.
(1) When the user edits an image, if the image (or another image) is not selected in the GridBinaryImageColumn then the existing image is deleted (or overwritten with null). What I'd like to have happen is that if no image is selected, I'd like to leave the existing image there.
(2) On insert, I'd like to have the UserID saved to the appropriate column in the SQL table, but I don't want to display it. Once the user is logged in then the UserID is stored in a session variable, but what I want to do is save the UserID value to the appropriate column on an insert. I don't need to worry about it on an update.
Thanks in advance for any insight.