|
I've been trying to find the best way to load data from SQL into a DataGridView. Obviously I could just load it into a DataSet with a SqlDataAdapter and set the dataSource of the DGV to the DataSet, but i'm having issues because there are 120,000 records that need to be loaded, and this takes quite a while to load DataSet from the adapter. I guess this isn't an issue with the DGV, but loading the data into the dataset.
Nathan Lindley
|
|
|
|
|
Maybe you should only grab the number of records that you are going to display in the grid at a time?
|
|
|
|
|
Well i was going to have them be able to scroll through the list instead of forcing them to search for a specific set of records, but that seems to be the only way.
Thanks
Nathan Lindley
|
|
|
|
|
I guess my only other suggestions for making it faster are to make sure that you are selecting ONLY the columns that you absolutely need in the grid, and to do everything you can (in terms of formatting) in the SQL statement so that you do not have to loop through the records to format after you have retrieved them.
Good Luck.
|
|
|
|
|
Agree.
Thanks Again.
Nathan Lindley
|
|
|
|
|
I have just installed VB .NET having spent several years using VB6.0. I have converted my VB 6.0 application to .NET and have the following error message:
VBControlExtender property inetftp was not upgraded
As I an new to VB .Net, can anyone help me please?
Rod
|
|
|
|
|
I was wondering if anyone knows of an image editor that works with vb.net on windows XP. It would be like Kodak Image Editor but would work with XP.
I have tried to put a picture into a panel but the problem I have is that I cannot zoom the image (picture). I am looking for something that will enable me to change size of the image once it is inthe vb code. Just like the Kodak or is there a way to do this.
Help
|
|
|
|
|
|
I do not like using third party tools but if there is nothing else will have to go for it.
Is it simple to put into the vb.net coding and does it come as an icon on the vb.net component toolbox
|
|
|
|
|
Paint.NET comes with source code. You can see how they manipulate images.
|
|
|
|
|
This is trivial. Just draw the picture yourself, and use a scale transform on the Graphics object, change the scale according to whatever UI you want to control zoom.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I am capturing a file from a folder and displaying it.
How would I go about changing the scale as you suggestion as by now you will realise I have not got a clue. New to this.
|
|
|
|
|
|
|
Thanks Dave for the following, it works a treat and yes easy
*******
Easy. Drop the PictureBox control into a Panel control on your form and set the Panel's AutoScroll property to True. In your code, load the image you want into an Image object, then set the PictureBox's Image property to that Image object and set the Size of the PictureBox to the size of the Image or to any size to you want.
*****
My next problem was when I put the image (tiff) into the picture box it is huge, have to use the scrolls bars. It there any way I can make the image a wee bit smaller when loading to save me making the object take up the whole screen. With crystal reports you have a command like
CrystalReportViewer1.Zoom(1)
Also I use XP and just found out it does not work with Kodak Image Edit Control. Works great with Win 2000. Is there anything out there, free, that does the same as Kodak but with XP
Does this make sense?
-- modified at 10:48 Thursday 25th January, 2007
|
|
|
|
|
You can set a picture box to show the entire image stretched to fit whatever size the picture box is.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
The problem I am having is, what if it is a large image by fitting onto the picture box size it becomes unreadable.
I must be doing something wrong with incoming file.
|
|
|
|
|
By unreadable, do you mean hard to understand ? If you shrink an image by a large amount, it's obviously going to lose all detail.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
True, but how can I shrink the image to such a size that it is readable. Then after that use the scroll bars to view different areas if needed.
Am I making sense?
|
|
|
|
|
You can tell the picturebox to shrink the image. If you want to use scrollbars instead, then you need to handle the drawing yourself, the picturebox becomes useless in this case.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi,
My application (designed in VB.Net 2.0) works good on local computer but when I deploy on server and try to run from clients I get following error:
'system.data.sqlclient.sqlclientpermission, systemdata Version = 1.0...,culture=neutral publickeytoken = ..... failed'
I have to run this appplication from 100s client computer and can't install on each client.
I have changed permissionSeting on server by using Microsoft .NET Framework Configuration Console and allowed 'FullTrust' for Local_Intranet_Zone, but still having the same error.
Can anyone help me out for this problem.
Regards
|
|
|
|
|
Have you tried something like:
CasPol.exe -m -ag 1.2 -url file://Server/MyShare/* FullTrust
|
|
|
|
|
Hello,
I tried it but still same result. Any idea what this problem could be?
Thanks
Nas
|
|
|
|
|
|
I have a problem concerning a row selection in a datagridview.
If i click on any cell in a specific row in a datagridview, I need it not to do anything, not even change the old selection in another row. I could not find any cancel for the click event on a cell. Do anyone have any solution for my problem?
Datagridview Selection
|
|
|
|