adarsh.mathur's Q&A profile
Windows Forms DataGridView and ContextMenuStrip
Hello all, 2 questions about using ContextMenuStrip in conjunction with DataGridView: 1. How can I get a ContextMenuStrip to open only if the user right-clicks on a cell, and not a cell header/row header/background/etc My current solution is to associated the CMS with the columns, and not the DataGridView, i.e.: datagridview1.ContextMenuStrip=Nothing For Each c As DataGridViewColumn In datagridview1.Columns c.ContextMenuStrip = dgvContextMenu Next Is there a better way 2. How can code handling a click event on the CMS determine what cell the cursor was over when the context menu was activated I have a partly-working solution, which ...Show All
.NET Development Can't Read & Write At The Same Time
I've got: one database (local) Two tables - both with hand-crafted DataAdapters & DataTables I open the connection object and fill a DataReader from the SelectCommand object I loop around this reader and in the process: Create an instance of a DataTable (via a function) Call the .NewRow() method several times adding data the call the .Update() method to commit the data On calling .Update() I get the message "There is already an open DataReader associated with this Command which must be closed first." I don't see how it can be the same command object as each is created within its own M ...Show All
SQL Server trigger issues
I am running a trigger on a table (cusomfields) that is to fire when the table is updated or inserted. The trigger takes the new data and moves it to another table called search_products. Search products is made up of 5 columns (product_id, search_terms, name, vendor and keywords). The search_terms column is a combo of the name, vendor and keywords columns. When the trigger fires, the column in the customfields table that updates the keywords table in the search_terms field works. But the problem I am having is that the search_terms column is not being populated with that keyword value. Here is the trigger below, you can see what I am talk ...Show All
Windows Forms how to disable navigation in child rows of a datagrid
Hi, I have a datagrid that is bound to a source who ahs child and then grand child relationship. I want my datagrid to show only parent to child relationship but not the child to grandchild relationship. How can I do this Thanks, ...Show All
Visual Studio 2008 (Pre-release) design question regarding generated proxy classes/DataContracts
Hello all, I have a design question not neccessarily directly related to Indigo: Let's say I have two services dealing with Customers, both will use a (or the same) Customer class as arguments in a servicemethod like == [Serializable] [DataContract] public class Customer{ private int _id; [System.Runtime.Serialization.DataMemberAttribute(Name = "Id")] public int Id { get { return _id; } set { _id = value; } } == Now users of the service can generate a proxy with svcutil and svcutil will generate a Customer class that can be used by the serviceuser somewhat like that: [System.Runtime.Serialization.DataContractAttribute()] & ...Show All
Architecture Windows Zip
Hi Is it possible to use the windows zip function on the command line I want to incorporate this into my program. I know there is an add on for win zip but was wondering if its possible to do with the windows own version... Cheers I tried to play with this http://www.rondebruin.nl/windowsxpzip.htm once, but never could make it work in either JScript or VBScript besides listing the ZIP archive's content. I've seen code opening ZIP archives and accessing "files" using the SharpZipLib in .NET 1.1. ...Show All
Visual Studio Team System Check for variable instantiation in loop
I am writing a custom FxCop rule to check variables instantiated inside a loop. This could be done in 2 ways:1. Look for a instantiation statement inside a method and then find if this statement is inside a loop.2. Look for a loop inside a method and then find of there is any instantiation statement inside it,I tried developing against both, but could not do it. Can anybody help Hi Mukul, What you're trying to accomplish is pretty advanced analysis. You need to detect wether a loop exists. As the do/while, for, foreach constructs are all higher level language functionality, this gets compiled into a set ...Show All
Visual Studio Team System Problem configuring TFS for SSL access (have already followed advice in other posts)
Hello, I have partially succeeded in configuring access to TFS through SSL. The final problem I have is that the "Documents" node of Team Explorer does not work (it has the dreaded red cross next to it). I have searched the forums and followed the instructions here: http://forums.microsoft.com/msdn/showpost.aspx postid=103796&siteid=1 However, my problem is not resolved. I have a single tier installation of TFS, access to this is over HTTPS via an ISA Server. The TFS install has three websites that get set-up during the initial installation process, the "Default Web Site", "SharePoint Central Admin ...Show All
Visual Studio enable to install vs 2005
I have tried to install vs 2005 but i got the message "vs_msi.setup could not be openned" any help thank you for all What OS are you installing on Are you installing from CD Did you get VS from MSDN ...Show All
SQL Server Auto Create trigger after re-initialization completed
Hi all, Is it possible to create a trigger after creation of table during reinitialization if so, how can I do that Thanks in advance! Hi, Stephanie, If I understand your question correctly, you wan to create a trigger on subscriber db right after replication agent created replicating table on subscriber database. If so, you can use post snapshot script. To specify a post snapshot script in Management Studio, right click a publication under replication node, choose Properties context menu to bring up Publication Properties dialog, on the left pane treeview, click snapshot, you should see the input fiel ...Show All
Visual Studio Team System Installed but where is it
Hi, I have installed version one of the msscci provider but I'm unable to locate any new menu items etc to access TFS source control from vb6 (sp6) or vs2003. I have TFS RTM on a new server and VS2005 dev edition + Team explorer installed locally (with a vb.net test project under source control). I have read this post but I have a 'publish' menu item not 'team foundation'. How do I verify my install and access the TFS scc from vb6 and vs2003 Thanks, Matt Matt, Is it possible that you have multiple MSSCCI providers on your machine VS2003 and VB6 only support one at any given time. I am wonderin ...Show All
.NET Development Can you use XML as a data source
I am trying to design an application that will run on a desktop PC and can store data in an XML file or something. Can someone please advise if this is possible I am trying not to use SQL (too expensive) or Access (the database is 2 Gigs in size and Access just doesn't handle large databases well). Any articles/books/opinions would be most appreciated. Since your DB is of size 2GB, I would not recommend using XML file as DB source. Rather, SQL Express editions (free as of now) would suffice . Check out more at http://www.microsoft.com/sql/editions/express/default.mspx Quote from the above ...Show All
SQL Server SQL Server 2005
I have just recently downloaded and installed vs2004/ss2005. So now I have the version of ss that comes with vs2005 and the developer edition of ss. I have been able to work with sqlexpress thru vs2005 but not with the developer edition. When I engage the configuration manager which is what I guess to perform the same function as the enterprize manager in ss2000, I am unable to find my databases. What am I missing here How am supposed to work with the developer edition Thanks, Fred H ...actually, that's http://blogs.msdn.com/sql_protocols . ...Show All
Visual C# Deploying a C# Application
I know this has been answered thousands of times, but I can't find a single answer, so I am asking again... I have written a C# program. It runs fine on any computer with .net installed. It fails miserably when .net is not installed. I do not want to drive all over the United States for the next three years installing .net on everyone's computers. How can I get this program to run on ANY Windows computer without having to go to the computer and install other stuff Hi, You will need to include the .NET redistributable with the Setup Package for your application. This will increase th ...Show All
Visual C# A simple question...
Ok. I have two textbox's and one button. I want to be able to place and integer in each textbox and press the button to add the two integers. I know this sounds simple but I have been doing VB all my life and this is a lil more complicated. I need to know for syntax experience. Thank you. ado machan, always remember to use Convert.toXXX in side a try catch block. try { textBox3.Text = Convert.ToString((Convert.ToInt32(textBox1.Text) + Convert.ToInt32(textBox2.Text))); } catch(Exception fe)//better u catch it using the FormateException class { //to do } prageeth gunathilaka prageeth1980925@hotmail.com ...Show All
