|
Hi,
does anyone has a good tutorial on pagination , I searched the internet no tutorial walking.
Thank you
|
|
|
|
|
|
its not working I already tried
|
|
|
|
|
It would have helped if you had stated that in the original question. What does "not work" mean? Does it not compile, does it throw an exception?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
there errors when connecting and following precedents and next BUTTONS do not work properly
|
|
|
|
|
We know that you can see your code, but you have to understand that we can't. We cannot see your Visual Studio output window or your debugger. Can you see why we cannot help you here? We can see no code and no exceptions.
|
|
|
|
|
..and the other articles produce the same error? Or a different one?
You can try and solve the error, ask the original author for help (there's a forum at the bottom of the article) or find some other example.
I'd still recommend dropping paging completely.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have no other solution I have too much data I need to do pagination
|
|
|
|
|
That does not mean that other solutions do not exist; paging is usually not done in a WinForm, even if there's a lot of data. We don't have a "pagelimit" as a book has, the complete concept of having a "page" should remain on the web, not in Forms.
Having a page is half an anti-pattern - most people will only use the first page at all times.
Large datasets can be loaded quickly by virtualizing the grid, and there's filtering to limit the dataset fetched.
Still, if you want pagination, you'd have to find a working component, or adapt one of the existing ones to your needs.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Virtualization is a very good solution for me but there is no tutorial to explain and I am beginner so it's hard for me
|
|
|
|
|
|
Golden Upvote for Patience Above and Beyond ... awarded
« I am putting myself to the fullest possible use which is all, I think, that any conscious entity can ever hope to do » HAL (Heuristically programmed ALgorithmic computer) in "2001, A Space Odyssey"
|
|
|
|
|
this totoriel is not well explained it is very difficult
|
|
|
|
|
|
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
If you can't read my code, try converting it here[^]
|
|
|
|
|
Normally we can configure SSL in internet explorer setting and it works fine for Thick application.
But if we run the application using Visual Studio then it is not using the SSL settings of IE.
|
|
|
|
|
Do you mean when running you site from Visual Studio in debug mode?
I can't see a reason why not, but maybe you are running on different IIS while debugging?
Try to add as much relevant info as you have...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
תפסיק לספר לה' כמה הצרות שלך גדולות, תספר לצרות שלך כמה ה' גדול!
|
|
|
|
|
|
The link you show us here is ****. You can use a simple function like
public static void ProtectConfiguration()
{
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.ConnectionStrings.SectionInformation.ProtectSection(null);
config.Save(ConfigurationSaveMode.Full, true);
}
|
|
|
|
|
if your way encryption, decryption can still be, but the example above you do not decipher if you do not have private const string SharedSecret = "?????";
|
|
|
|
|
Hi,
I would like to write a console app that can determine the local administrator account using its SID and then change the password. I have been using a vbscript to do this but ran into an issue where it no longer works properly (long story). I would like to rewrite this as a C# console app instead. I am hoping that a compiled app will sufficiently hide the password being used which would be present in the source code.
The vbscript uses the WMI Win32_UserAccount namespace to determine which local account belongs to the administrator. It's done this way because you don't always know the name of the administrator account (it's renamed for increased security).
I'm fairly new to C# and I'm not sure where to start. I have been doing some searches for awhile now but I'm not finding any good sources on using WMI with C# or any other method for that matter.
What is the proper way to approach this task? Is WMI the wrong way to go about it? I think using WMI would be the easiest approach if I could figure out how to use it. I think I'll need a reference to System.Management for starters.
I'm not necessarily looking for someone to give me a solution but rather offer guidance to get me on the right track. I really want to learn C# but it feels like a huge task at this point even for this simple project. The language is enormous!
Thanks,
Rob
|
|
|
|
|
robwm1 wrote: which would be present in the source code.
Ummm... may I recommend a command-line parameter?
|
|
|
|
|
I could use the command "net use" to change the password but I need the local admin's username first. That is the part I'm having trouble with.
|
|
|
|
|
it doesn't sound 'too hard' in c# - I guess its far for me to suggest that
a) using MSAD is a better choice
b) hiding the password in a compiled app, well, it can still be discovered - it all depends on a risk analysis of what the threats are as to wether that risk is acceptable
c) you could do a first cut with C# & WMI since you know WMI already - I personally don't like WMI, I feel it has too much overhead, I may get shouted down for that comment - but heck, if it works and you're happy with it - else translate out the WMI parts for 'native' C# (which may also be p/invokes since C# doesn't cover every possible Win32 API)
d) how is this program supposed to run ? obviously someone could simply stop it running - which is a risk in itself
e) what if the program 'breaks' - how do you then get access to that machine/account ? ( a back-door ? [shiver] )
There is plenty (even here on CP) about using WMI with .Net - there's even a tool somewhere, Im still looking for the reference that iirc build the WMI query for you
Have a look at this for example while I try to find the tool I was thinking of .. http://www.developerfusion.com/article/5450/using-wmi-from-managed-code/[^]
Don't be discouraged - even by my questions - if you have a good enough reason, and there's no other way, then ya gotta do what ya gotta do
|
|
|
|
|
Garth,
a) MSAD - If you're suggesting GPO, information security rejected that method because the communication is all clear text.
b) My executable will be inspected before it is adopted to see how easily the password can be discovered. Only then will I be able to deploy it. I'm currently using Microsoft Encoder to encode my vbscript. VBS becomes VBE but it is only protection from casual browsing. That has been acceptable for the last 13 years, so I'll have to see if I can gain approval. I can report back the result for those that are curious.
c) I don't use WMI much but there are some cases where it's pretty handy. I get what you're saying about overhead. It does noticeably slows things down. Another method that is perhaps more efficient would be to read the keys from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList into an array and look for the local admin. I don't know if the SID is the same for local admin across all computers but I'd lean towards that it's not the same. I notice the username isn't located in those profiles but WMI will expose that information.
d) This app would run hidden/silent on a daily basis. Our users aren't savvy enough to kill the process. It would happen in a random fashion and run in a split second. This has been considered acceptable risk.
e) In the event a password doesn't seem to be working properly, we have accounts to get around that.
I haven't found very much info on C# and WMI so far. I do know where to find a list of WMI classes. I can also figure out which properties are available with each class. I find MSDN to be difficult to understand at times until you understand the basic concepts. You can literally get lost in all of the documentation.
I'm not discouraged. I've found everyone in this forum to be very helpful and professional. Every project you can come up with is a bit of a puzzle. It's fun to work as a community to find solutions...
|
|
|
|