Vasanths R's Q&A profile
Visual Basic How to add comboBox in a data grid column, DataGridComboBoxColumn???
The question is simple, & for sure sample code will b there, I searched & found only C# smples :( I want to add a combo box dynamically [at runtime] in the data grid, it should appear in one of the columns of the grid, say column 1, a text box, column 2 a check box, column 3 is a combo box please provide vb.net sample, if you use any self mde 3rd party specialized class, provide the code please HI Paul thank you so much for your reply & showing interest in solving my problem, tks but i have left that work & working on another form, so may be i won't be able to reply you, i solved the problem this how i added a control in the datagridcell textbox.controls collection, filled it usinf For Each Loop &am ...Show All
SQL Server Aborting a thread CRASHES Sql Server 2000!
Hi, I'm creating a new thread and executing a database import operation using a transaction. I have had several problems that I cannot explain, the most serious of them being that aborting this thread sometimes crashes the instance of Sql Server to which I was connected! The application is a Windows Forms app, and when I launch the import operation I display a form that allows me to abort the import while it is in progress. If the user decides to abort the import in the middle of things, I call the Abort() method of the thread executing the import. I'm catching any exceptions in the method on the bottom of the call stack (the ThreadStart delegate) and logging the information, and from the stack trace I can see that the ThreadAbort ...Show All
Visual C# Certification for C#
is there a Microsoft certification exam for C# on Visual Studio 2005 if not, whats the closest exam # that kinda covers C # Thanks You can take any one of the below examination. The exam you will chose depend upon your skillset and expertise in Windows or Web or Distributed aplications. Have a look at the below examinations and choose any one of them which is the most suitable for you. (1) http://www.microsoft.com/learning/mcp/mcts/winapps/default.mspx (2) http://www.microsoft.com/learning/mcp/mcts/webapps/default.mspx (3) http://www.microsoft.com/learning/mcp/mcts/distapps/default.mspx Regards, Snehal ...Show All
Windows Forms How to prevent tab from losing focus when in last row/ last column
Greetings: I am inheriting from the DataGridView. It is a register-like application with columns for SKU, Item Name, unit price, subtotals, etc. The datagridview is set to allow "new rows". I have been able to get the DataGridView to skip read-only columns. The only problem I'm having and can't seem to get easily is that the DataGridView by default loses its focus when the selected cell is the last row in the last column. When you press the tab key, it will tab over to the next control on the form. Rather, I'd like it to either tab to the first row or not tab at all (since the last row, last column is the new row). I have attempted to override OnLostFocus and set the focus back on the grid. This works, however, it really messes u ...Show All
SQL Server format issue
I've created a new calculate member in (SQL Server Business Intelligence Studio 2005) with the following format string: "#,#0.00". This measure is displayed like this: 22,250.22 Then I created a Measure in the Cube structure menue and used the same format string:"#,#0.00" and this measure is displayed like this:0,66 --> Comma and decimal point are changed in the display of the measures!!!! Can anyone help me with this I just like every measure to use a decimal point for the decimal place or the other way round. But I want every measure to be displayed in the same format! Thanks a lot! We've had a problem like that too. As far as I can remember, it is a known bug where calculated members are formatted accordi ...Show All
.NET Development CreateProcessAsUser failed
For some reason i need to spawn a seperate process executed in another users context. The Assembly will be used within normal applications and asp.net webapplications also. I already got the WindowsIdentity of the new user and so i can impersonate this user for the running process. Next i tried to use the CreateProcessAsUser-Method described in KB article 889251 (http://support.microsoft.com/default.aspx scid=kb;EN-US;889251), but this failed with error 1314 (A required privilege is not held by the client.) This happens on WinXP and 2k3 Server, the "Replace a process level token" user right is applied to the impersonated user. If i run my test program as the user i want to impersonate, it runs fine. What did i miss, any idea than ...Show All
Visual C# Beware my nasty code! - how can I simplify this?
Hi have the following switch statement that tests for a value and then loads up its relating Form. switch (objQuestion.m_objQuestionType.m_strCustomForm) { case "FormInspectionAnswerCustomLocation": frm = new FormInspectionAnswerCustomLocation(ref objQuestion); break; case "FormInspectionAnswerCustomCause": frm = new FormInspectionAnswerCustomCause(ref objQuestion); break; case "FormInspectionAnswerCustomProduct": frm = new FormInspectionAnswerCustomProduct(ref objQuestion); break; case "FormInspectionAnswerCustomSupplier": frm = new FormInspectionAnswerCustomSupplier(re ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Keyboard KeyPressed state?
I'm having some trouble trying to perform an action based on a KeyPressed state rather than iskeydown or up. I managed to add a bool variable(for jumping my character up) to lock the keystate until it has hit the floor again but I hoped I could do one action only(i.e. jump once) while holding the keyboard button. I dont have a XBOX360 controller to test but I believe there's a KeyPressed state that should work. Has anyone tried to mimic that onto a keyboard To make the character jump only once, you need to get the current keyboard state and compare it to the keyboard state from the previous frame. So at the beginning of the update method you would get the current keyboard state, do whatever comparisons ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Performace: can't this thing draw any faster?
I'm certain that I my code must have some critical inefficiency somewhere; I can run my favorite 3D video games at maximum settings, but my little DX app slows down to < 90 frames per second when it tries to draw 100 little boxes. Here's the code in a nutshell: protected D3D.Texture _texture; protected static D3D.Sprite _sprite; _texture = MakeTexture(); // ends up producing a 1x1 white texture _sprite = new D3D.Sprite(graphics); dx_graphics.BeginScene(); for (int i = 0; i < 100; ++i) { _sprite.Begin(D3D.SpriteFlags.AlphaBlend); _sprite.Draw(_texture, new Rectangle(0, 0, (int)500, (int)500), new Vector3(0.0f, 0.0f, 0.0f), new Vector3((int)300, (int)200, 0.0f), Color.FromArgb(255, 255, 255, 255)); _sprite.End(); } dx_graph ...Show All
SQL Server How to get the latest & earliest date?
Hi, How to get the latest date from ColumnDateTime and the earlier as well Maybe something like select max(columnDateTime) from yourSourceTable where anIntegerColumn = 14 If your column is a varchar column that WHERE condition will look like: where aVarcharColumn = 'theTargetString' ...Show All
Visual Studio svn checkout through MSBuild
Hello friends , Anybody knows how to write task or anything which do svn checkout through MSBuild. i installed Subversion 1.3. its run fine on visual studio command prompt but when i run it through MSBuild by exec command , it gives error as "svn" invalid token. The error is "error MSB4025:The project file could not be loaded. 'svn' is an unexpected token.Expecting white space ." I also checked this site " http://msbuildtasks.tigris.org/ " but here we need to import the MSBuild.Community.Tasks.Targets files and install the project. Is there any another way to svn checkout without doing this. ...Show All
.NET Development Generic Dictionary and IEqualityComparer
Hello, I have troubles understanding the implementation of the Generic Dictionary class in .NET 2.0. The documentation states the following: "Dictionary requires an equality implementation to determine whether keys are equal. You can specify an implementation of the IEqualityComparer generic interface by using a constructor that accepts a comparer parameter; if you do not specify an implementation, the default generic equality comparer EqualityComparer.Default is used. If type TKey implements the System.IEquatable generic interface, the default equality comparer uses that implementation." I then wrote the following program to test: ------------------------------------------------------------------------ class Item : IEquat ...Show All
Visual Studio 2008 (Pre-release) Data Binding: How to bind a group of Radio Buttons to a value/collection?
Are there any properties that represent the selected state of a group of Radio Buttons Seems that Radio Buttons are very different controls from others in that cannot represent any value in and of themselves, they must be combined with others. Thus one typically wants to bind the entire group to a single value and map the selected radio button in some way to represent a value. In the most simple case 2 radio buttons representing to a collection of {true,false}. Is this the kind of situation where MultiBindings might be applied Thanks NIK I need to bind to a business object, well outside of code behind, but this gives me some of the picture. However, how/where are s: and p: declared I tried ...Show All
SQL Server Dynamic Stored Procedures uses vars only
Hi there, I would like to know how to create Dynamic stored procedure which defines TableName as a Variable and return all fields from this Table. And also how to Dynamicly create a sp_GetNameByID (for instance) using vars only. Thanks It would be very helpfull to me if you could give links of Dynamic SQL tutorials from which i can learn. Writing dynamic T-SQL doesn't strike me as being relevant to SSIS so I'm a little confused. Perhaps you could elaborate. By the way, best practice stipulates that you shouldn't name your sprocs "sp_*". -Jamie ...Show All
Visual C++ Simple parallel for with nthreads=3 only creates 1 thread???
int main( int argc, char * argv[]) { int i; float x[1000]; #pragma omp parallel for schedule( static ,100) num_threads(3) for (i=0; i<1000; i++) { if ((i%10)==0) printf( "%d %d\n" ,omp_get_thread_num(),i); x =sqrt(( float )i); } scanf( "%d" ,&i); return 0; } //THREAD No. IS ALWYS 0 ; ALSO where is vcompd.dll so I can debug Sorry, when i got the "missing vcompd", i switched from debug to release but silly VS doesn't propagate settings in one to the other so /openmp was not set. Now it works. ...Show All
