Hello,
I'm new to infragistics and I want to show a list of pdf files on the screen. Please help me out.
I want to make use of ultralistview to show pdf files as thumbnails with checkboxes on the top of each pdf file to check and uncheck them. Please see the attachment of how I need to show up pdf files on screen .Sample example would be really helpful.
Thanks,
AB.
Hello Anil,
In order to add checkboxes on top of each UltraListViewItem you could use the Creation Filter. It is used to modify, add to and/or replace the UIElements of a control. So, you need to implement the IUIElementCreationFilter interface on an object and set the CreationFilter property of the control to that object at runtime. The IUIElementCreationFilter has two methods BeforeCreateChildElements and AfterCreateChildElements. By implementing these methods you could add checkboxes on top of each UltraListViewItem. More information about the Creation Filter you could find on the following link:
http://help.infragistics.com/Doc/WinForms/?page=Win_Creation_Filter.html
I have implemented this suggestion in a simple sample, so you could run and evaluate it. Please see attached zip.
Please do not hesitate to contact me if you have any additional questions.
Thanks for your response.
My requirement is that I have multiple rows with in SQL server database table with 5 columns and one of the column with datatype 'image' and with file extentions pdf . So I need to retrieve those files on to screen and display them as you provided and show the checkboxes on the top to check and uncheck. I'm working on Windows forms and making use of infragistics.Please help me out. Sample example for this would be really helpful as well. I really appreciate your help.
Based on your description I’ve tried to create a simple project that reproduces your scenario. Instead a SQL database I’ve used DataTable that makes no difference concerning the final result. So, what you could do is to write a query that takes all the books from your database/datatable with a ‘pdf’ extension. Then to pass through all files from the folder on which your database/datatable is based and to put in the UltraListView only those files whose name and extension equals with an item returned from the query. Please pay attention to the ‘pdfs’ folder in your project. The final UltraListView contains only the pdf files from that folder.
I have implemented this suggestion in a simple sample and you could run and evaluate it. Please see attached zip.
I hope that this will help you.
Hello Atnas,
Sorry to bother you but my doubt is still not cleared. I just want to use the datatable and not the folder with pdfs. I'll have a datatable coming from database with one column as image datatype and I want to use that table to show the pdfs on the screen (by converting the bytes for image column). And these pdfs shown on screen should be in such a way that i should show the first page of the pdf (please the the attachment from the 1st post) and when I click on it, it should show up in a preview by using controls like splitter (like the pictures/ excel files we now see in the windows explorer). I really appreciate your help and sample example would be really helpful.
Please do not hesitate to contact me if you have any additional questions concerning Infragistics products.
Thank you Atanas.
In my sample I am using data table and I show you the approach with data table. However since UltraListBar does not support binding, so that you could bound it to a data table and it will be automatically populated, I think that this part of your questions is irrelevant to usage of Infragistics UltraListView. I meant that there is nothing specific here and you should get your data from your date base as you would do with any other standard MS Component.
Infragistics do not support pdf Preview, so how exactly you could get preview of the first page of a pdf file is an issue that falls outside of Infragistics developer support. However I’ve made some research in the web for you and I found following tutorial which might be very helpful:
http://www.codeproject.com/Articles/5887/Generate-Thumbnail-Images-from-PDF-Documents
Please let me know if you have any further questions related to usage of Infragistics Components.