Click here to Skip to main content
15,885,952 members
Home / Discussions / C#
   

C#

 
GeneralRe: paging C# windows Form Pin
Ibrahim.elh5-Nov-14 21:24
Ibrahim.elh5-Nov-14 21:24 
GeneralRe: paging C# windows Form Pin
Eddy Vluggen5-Nov-14 22:33
professionalEddy Vluggen5-Nov-14 22:33 
GeneralRe: paging C# windows Form Pin
Ibrahim.elh5-Nov-14 22:37
Ibrahim.elh5-Nov-14 22:37 
GeneralRe: paging C# windows Form Pin
Eddy Vluggen6-Nov-14 1:03
professionalEddy Vluggen6-Nov-14 1:03 
GeneralRe: paging C# windows Form Pin
BillWoodruff6-Nov-14 1:08
professionalBillWoodruff6-Nov-14 1:08 
GeneralRe: paging C# windows Form Pin
Ibrahim.elh6-Nov-14 2:06
Ibrahim.elh6-Nov-14 2:06 
GeneralRe: paging C# windows Form Pin
Ibrahim.elh6-Nov-14 2:37
Ibrahim.elh6-Nov-14 2:37 
GeneralRe: paging C# windows Form Pin
Eddy Vluggen6-Nov-14 9:37
professionalEddy Vluggen6-Nov-14 9:37 
Yup, you're right; it is complexer than simply binding. It takes more time to write, and it takes some extra time to change the structure to something that loads on demand - but then the grid will load and display fast, even scrolling the grid with the mouse will be rather quick.

I've never tried the code from the HowTo that you linked, but I did complete the Walkthrough. To me, the walkthrough looks like it is simpeler. The idea is easier to follow if you only implement a readonly-datagrid, meaning you'd only implement the <a href="http://msdn.microsoft.com/nl-nl/library/windows/apps/system.windows.forms.datagridview.cellvaluen">CellValueNeeded</a>[<a href="http://msdn.microsoft.com/nl-nl/library/windows/apps/system.windows.forms.datagridview.cellvaluen" target="_blank" title="New Window">^</a>]-event. Not the push, no delete, only the stuff to display the data.

I always make mistakes when implementing those together, so I always start with a readonly-grid. One part to load the data into a List (of object-arrays), executed on a separate thread, and the CellValueNeeded event that gets the data from that list and displays is. If you have 10 items in the list, you set the RowCount value of the grid to ten, and the grid will ask a value for each visible item.

Another reason I like the approach is because it allows me to display a ProgressBar that shows how much is loaded - no white forms for five seconds while databinding, but a nice progressbar with a Cancel button.

There's other alternatives though; one I read here that sounds as a logical and quick solution is to fetch up to a maximum. I think the most common solution is to add another filter, to force the user to think about specifying more precisely which data he/she needs.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

QuestionHow to use SSL in C# Visual Studio Pin
arunava_sinha4-Nov-14 22:20
arunava_sinha4-Nov-14 22:20 
SuggestionRe: How to use SSL in C# Visual Studio Pin
Kornfeld Eliyahu Peter4-Nov-14 22:39
professionalKornfeld Eliyahu Peter4-Nov-14 22:39 
Questionencrypt the connection string in the app.config file ? Pin
Member 24584674-Nov-14 15:26
Member 24584674-Nov-14 15:26 
AnswerRe: encrypt the connection string in the app.config file ? Pin
Bernhard Hiller4-Nov-14 20:39
Bernhard Hiller4-Nov-14 20:39 
GeneralRe: encrypt the connection string in the app.config file ? Pin
Member 24584675-Nov-14 14:37
Member 24584675-Nov-14 14:37 
QuestionWhat is the best approach to changing the local admin password? Pin
robwm14-Nov-14 11:44
robwm14-Nov-14 11:44 
GeneralRe: What is the best approach to changing the local admin password? Pin
PIEBALDconsult4-Nov-14 12:59
mvePIEBALDconsult4-Nov-14 12:59 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm14-Nov-14 15:10
robwm14-Nov-14 15:10 
AnswerRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster4-Nov-14 13:15
professionalGarth J Lancaster4-Nov-14 13:15 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm14-Nov-14 16:44
robwm14-Nov-14 16:44 
GeneralRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster4-Nov-14 17:04
professionalGarth J Lancaster4-Nov-14 17:04 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm14-Nov-14 19:41
robwm14-Nov-14 19:41 
GeneralRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster4-Nov-14 19:43
professionalGarth J Lancaster4-Nov-14 19:43 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm15-Nov-14 3:50
robwm15-Nov-14 3:50 
GeneralRe: What is the best approach to changing the local admin password? Pin
Garth J Lancaster5-Nov-14 12:21
professionalGarth J Lancaster5-Nov-14 12:21 
GeneralRe: What is the best approach to changing the local admin password? Pin
robwm15-Nov-14 12:36
robwm15-Nov-14 12:36 
QuestionWindows Workflow Foundation - Implement conditional Activites Through C# Code Pin
Member 86262243-Nov-14 19:26
Member 86262243-Nov-14 19:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.