GazNewt's Q&A profile
Windows Forms DataTable sorting
I have a DataTable binded with DataGridView. I may provide my own sorting for DataGridView (via ICompare), but I can`t when DataSource property is used (and it is in my project). I would like to sort rows, when user clicks in the header of a specific column, but I don`t want the default sorting. Default sorting is like that: 0,1,11,12,2,3,4I want a numeric sorting: 0, 1, 2, 3, 4, 11, 12how to achive this Seems correct, thank you very much, but the problem now is, that I have the first column of type int , and the rest of the columns of type A. Klass A has method ToString() overriden to meet my personal expectations, that in specific situations returns empty string ( "" ). I also set datatype for ...Show All
Windows Forms Auto-Login using Web Browser Component
Hey, I wonder if anyone knows how to create an app using C# and the Web Browser Component that detects both textfields for username and password, inputs the appropriate values within them and then simulates a Click in the Submit button... Thanks The main intention is basically to detect a textbox in a web page and fill it with a certain value of a string, it is only for educative purposes I wish to know how could C# interact with webpages for accessibility purposes, for example it is a lot easier to simply press a button and fill a login form than to fill the fields by yourself. Once again, the goal is to use a C# app (preferably using the Web Browser Component included in Visual C# Express 2005) that can detect a login f ...Show All
SQL Server Checking to see if a record exists and if so update else insert
I've decided to post this as a sticky given the frequency this question is asked. For those of you wishing to build a package that determines if a source row exists in the destination and if so update it else insert it, this link is for you. http://blogs.conchango.com/jamiethomson/archive/2006/09/12/SSIS_3A00_-Checking-if-a-row-exists-and-if-it-does_2C00_-has-it-changed.aspx Thanks Jamie! If you want to do a similar concept to Jamie's blog post above, but with the Konesan's Checksum Transformation to quickly compare MANY fields, you can visit here: http://www.ssistalk.com/2007/03/09/ssis-using-a-checksum-to-determine-if-a-row-has-changed/ Phil This is very helpful. Thanks! I am completely new to the SQL Server Integration Servi ...Show All
Visual FoxPro Import Command problem
I downloaded some data from Yahoo and saved it in .scv MS Excel format. It is a MS Excel Comma Separated Values File . Now I want to use an IMPORT command to import the data in VFP. I run into a problem with it. The command I use is as follows: IMPORT FROM "D:\VFP_Projects\DATA\D_data\table1.csv" DATABASE "D:\VFP_Projects\DATA\D_Data\d_HistData.dbc" NAME tempTable TYPE XLS It seems the problem is related to the fact that this file extension (.scv) is not specified in the IMPORT command description. If I use TYPE XLS I get an error " Microsoft Excel file format is invalid ." If I put in TYPE SCV instead I get an error that there is a "syntax error." If I drop the TYPE clause altogether I get: &q ...Show All
Visual C# Why is this not valid!!!???
I have a question that nobody in my department is able to answer. It came to me while using the Class Designer to stub out our data access layer of our application. The question is: If I create an abstract worker class as such: public abstract class MyClass { public abstract void MyMethod( DataEntityAbstract Entity); } Then try the following in its derived class: public class ThisClass : MyClass { // ThieDataEntity is derived from DataEntityAbstract class public override void MyMethod( ThisDataEntity Entity) { // Do Something } } Visual Studio 2005 will throw a compilation error. Why I mean, polymorph ...Show All
Visual C# Difference between nesting and inheritence of classes
Hi, Can any one tell me if there is a difference between nesting of class and inheritence. Regards Santanu Hi, So what is the yield of nested classes or what is the purpose Why do we need to use nested classes Can anyone explain Thanks in advance ^^ ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Rotating models around their own centers
Hello, I'm having a bit of trouble rotating models around their own centers; instead any new physical object I place in the world will perform its rotations from the world origin, not their own. I understand that the order of the matrices matter, and as far as I know I'm applying these correctly. Each object is a DrawableGameComponent and has its own transform matrix. In the drawing code updates by the transform and world matrices: public override void Draw(GameTime gameTime) { foreach (ModelMesh mesh in model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { effect.EnableDefaultLighting(); effect.World = destinationBoneTransforms[mesh.ParentBone.Index] * world * transform; ...Show All
Visual Studio Team System TF31002: Unable to connect to this Team Foundation Server.
We just installed Team Foundation Server Suite. I can access it from the same machine but when I try from other machines, I get a failure notice, TF31002: Unable to connect to this Team Foundation Server. Possible reasons for failure are - The Team Foundation Server name, port or protocol - The Team Foundation server is offline - Password is expired or incorrect. For more information, contact the Team Foundation Server Administrator. Well, the server name, port and protocol are correct, the server is online and the password is not expired and I am the Administrator. Any hints We solved our problem too. I uninstalled and reinstalled Team Explorer and everything is fine now. I suspect that the de ...Show All
Visual Studio Express Editions Online help file
I would like to know the URL for the C# express online help file. I have the file that was loaded with C#. I just want the online location. There isn't really an online help file. For C# you would start off at http://msdn.microsoft.com/vcsharp/ To learn more about the language you get to http://msdn.microsoft.com/vcsharp/programming/language/ That links to the reference material http://msdn.microsoft.com/vcsharp/programming/language/#Language%20References ...Show All
.NET Development Error:product level insufficient
Hi I get this error when I try to run my package on sql server Error: Product Level is insufficient for component "data conversion" We already have SP1 and SQL Server Integration Services installed on our workstation components ...Show All
Windows Forms dataGridView issue
i am using c#.net 2005. on my form, i have a databound dataGridView component for displaying patient list, the first column is "patient_id". when i click on a button, i want to find out the patient_id of selected row. please help hi ahmedilyas, i did it MessageBox .Show( this .clientsDataGridView.CurrentCell.OwningColumn.DataPropertyName); now i know the databound dataGridView only display the column names dynamically, therefore we have to use DataPropertyName to fetch the actual column name however, the previous code with this change still wont change the fact that it wont take actual name of column: MessageBox .Show(clientsDataGridView.CurrentRow.Cells[ this .clientsDataGridView.CurrentCell.OwningColumn.DataPr ...Show All
Visual C# How to use c # to write shrinking algorithm?
Algorithm use c # language is described shrinking Can write the code example thanks ----------------------------------------------------------- --This is group of data ,Judge next number through these datas What method have ----------------------------------------- 1: 019 2: 484 3: 733 4: 313 5: 736 6: 255 7: 459 8: 558 9: 504 10: 735 11: 193 12: 035 13: 550 14: 814 15: 916 16: ...Show All
Software Development for Windows Vista Problem with uncompressing files.
Hi I use the Vista thats the latest from MSDN and running it on a brand new laptop. When i try to uncompress files in both .NET and the UI it runs the application but no files get unzipped to the file. The UI goes away and then nothing happens. I tried downloading Winzip and Winrar and they all behave the same. I wrote my own unzip code in VS 2005 using C# and the code executes fine, no errors. But still no files unzipped. The only way i can unzip files are to start winrar and select the path to where i want to send it. Right click method does not work at all. Thanks I posted a solution to this on my blog: http://bphillips76.spaces.live.com/ Bryan Phillips MCSD, MCDBA, MCSE blog: http://bphillips76.spa ...Show All
Visual Studio Team System Scalable deployment using distributed designers
Hi, I'm trying to create a deployment diagram that has an ASP.NETWebApplication deployed to multiple IISWebServers. I have set the Scalable property of the application, the server, and the zone the server belongs to, to True . However, I'm still unable to deploy to a 2nd server: 'Application has already been bound. Unbind the previous version, or configure another use of the application in the System Designer' What more is there to configure Thx in adv. Eric Short Answer: Yes you can do this, you'll need to create another instance of your ASP.NETWebApplicaiton on the system desginer first. Longer Answer: The issue is that the specific instance can only be bound once. On the AD y ...Show All
Visual Studio Express Editions Cleaning up
I have a class that contains a looping thread checking for input from a socket. When my application closes I would like this class to stop the thread so the program exits cleanly. I managed to stop it cleanly in my main program by listening for the game.disposed event, but i would like the class to close itself internally when the rest of the program is being cleaned up. Show me the way someone... Keep a reference to the thread instance and call the Abort() method to stop it when your application is closing. Another way would be to have a bool in the class where the thread code is running in declared as volatile. Default the value of the bool is false and when the application is closing it gets set to true. In the thread you check ...Show All
