Click here to Skip to main content
15,881,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I was thinking about having a dynamic table that has photos of my gym's clients. But when I set it to resize all rows accordingly the rows are huge, and it's so annoying if I have like 10000 records. If I do not resize the rows the image is cropped to the point that I cannot see the client's face.


Any ideias on how to resolve this problem?

What I have tried:

Actually I have this grid with some data, for security measures I had to hide all the sensitive data.
[DataGridView table with photos.]


SQL query:

SQL
cc.cmd = new SqlCommand("SELECT RTRIM(C_ID) as [#],RTRIM(CustomerID) as [# de Cliente],RTRIM(Name) as [Nome],RTRIM(Address) as [Morada],RTRIM(City) as [Cidade],RTRIM(ContactNo) as [# de Telemovel],RTRIM(Email) as [Email],Photo from Customer order by name", cc.con);
Posted
Updated 2-May-17 0:16am
v2

1 solution

When you are storing images of your client, There should be one real image and one thumbnail images.

For view purpose thumbnail will be fine as per your requirement, when somebody clicks on it, It will be enlarged.

Let us know if you have any query or concern for same.
 
Share this answer
 
Comments
Scribling Doodle 2-May-17 6:18am    
Done, Actually I do not have any thumbnail, but as I was thinking, The size wouldn't really matter, because the picturebox can resize to it's actual size. Instead I was simply thinking about resizing the image and insert it in the database and then the picturebox would stretch it out on the Updating form. Would this be a good ideia?
Nirav Prabtani 2-May-17 6:40am    
Storage of thumbnail would be a better instead of stretching original one.
Scribling Doodle 2-May-17 8:05am    
So, by your logic, I should create a thumbnail column, and then resize the image programmatically and then insert into the thumbnail column. Is that what you're saying?
Nirav Prabtani 4-May-17 3:43am    
You should store thumbnail and real image, either you store physically to directory and store path in database column or you can store both images to database directly and get images according to your need

The logic is upon you but I have just guided that you can use thumbnail during listing.
Scribling Doodle 4-May-17 3:47am    
What I did to minimize the impact on the memory spent dealing with this tasks was simply create a column called thumbnail and simply resize the image to a 100x100 image and then instead of converting the real image and processing the thumbnail directly on the datagrid, it simply loads the thumbnail photo, leaving me much more memory for other tasks. Thanks in advance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900