Kelo's Q&A profile
Windows Forms Need DataGridView Read/Write Example ComboBox
VB2005, SQL Server 2000 The MS supplied 101 sample DataGridView ComboBoxColumn example is read only which is kinda dumb since I'm not sure when one would ever need a read only dropdown. Has anyone seen a KISS example of connecting to a SQL Server 2000 table (spmething like the PUBS DB, authors table) using a DataGridView with a combo, say on the State field Need to see something that does not use the DataSource wizard objects. In general: Is it possible to bind to a dataset using the auto generated columns and then change a column type to Combo Or does one have to construct all columns manually if any are other than the a ...Show All
Windows Forms Passing a Parameter in a DataGrid ButtonColumn
Greetings, I am using a DataGrid to display advertisements on a ad board. All works great, except on day 2, the links that were visited show visited today. The culprit is that the control links that are really a ButtonColumn are rendered with; href=__doPostBack('DataGrid1$_ctl7$_ctl0','')" and the next day there are mor of these same links. Ideally I would like to set the eventArgument parameter, to a unique ID to have something like... href=__doPostBack('DataGrid1$_ctl7$_ctl0',' 37452 ')" In this way each Item would be Unique. I have thought about modifying the Render which seems like it would be simple enough but I have heard the ...Show All
Visual Basic Events: why use them instead of member call coupled with DoEvents()?
Hello. I've been reading up on Events, and don't see what they offer that just doing a member call, followed by DoEvents() would not do for you When I indicate an event, the function that indicated it must wait anyway for the event to return control. And DoEvents() would accomplish the same thing of seeing if, for example, the user clicked the 'Cancel' button if I was to call a function, then DoEvents() after it, then checking for cancel button. What am I missing I don't see any difference. I searched these forums as well and didn't see an appropriate response. Any help, or references to where an identical question was asked would be a ...Show All
.NET Development Browse database objects
How can I browse database objects (tables, views for example) in .NET In ODBC API there is a SQLTables() function. If you're using Sql Server 2005, you can query the system catalog view: Select * from sys.tables ; Charles ...Show All
Visual Studio Tools for Office Word: How to skip few events' instances
We've built an VSTO Word based application which lists all data in xml format. Whenever user moves to a new xmlnode , the document actions pane needs to be refreshed with node specific information (code written in xmlselection change event). Things work fine as long as user moves between nodes in a normal way. However when user presses down arrow continuously (scrolling down the page), he might be moving through n no: of nodes in no time, and this triggers n no: of events to the app ( xmlselection change). Refreshing document actions pane is costlier here and user sees the app as either hanging or slow in responding. (Word is issuing all ...Show All
Visual Studio CLR debugger stopped working
Hi guys, I'm trying to debug my asp.net pages with the clr debugger (I don't have Visual studio, but only the CLR debugger). After the installation the debugger worked, but now it just stopped. The debugger doesn't allow me to set the breakpoints in the vb file (codebehind). Exactly, It says: The breakpoint won't be hit. No symbols have been loaded for this document. I added the line debug="true" both in the web.config file and in the aspx page I want to debug but nothing happened. Please some help. Thank you, Christian Malatesti Do the PDB files (symbol files) match with the binaries, i.e. do the PDB files hav ...Show All
Visual Studio Express Editions A reference to the "....dll" could not be added.Please make sure that the file is accessible and that it is a valid assembly or
When i add a .dll file as a reference in C# application it shows an error : A reference to the "....dll" could not be added.Please make sure that the file is accessible and that it is a valid assembly or COM component. Willfin David I assume you are working with VS2005. So here is the work around for that Execute "tlbimp <....>.dll" <Drive>:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin>TlbImp.exe <....>.dll This command creates <...>CORELib.dll and add it as a reference to the project. Hope this works, Let me know the result.. ...Show All
Windows Forms MDI app, and resizeable region
I have a MDI app. Docked on the right side of the parent is a Panel. I want the user to be able to resize the panel (make it wider or more narrow) What's a good way to do this I'd consider using a different container control I'm using 2.0 (On the panel is a ListView) Thanks for your help. I have the form doing what I want... the spliter and its proper configuration work great. I'm usign VS2005 which has the great Document Outline tool window... it makes it a drag-and-drop snap to alter the z order of controls.. if you haven't' seen it you should take a look. ...Show All
Visual C# classname[from Metadata] file
Why whenever i want to check a definition of a function, VS2005 take me to the file "anyclassname[from Metadata]" where it is like a class declaration with all the member functions and variables. it is located is a tempory folder. Why the IDE doesn't take me to the actual source code If the source code is not available then it will do what you said. For example doing that for any of the framework classes will take you to the metadata-generated file that was created from the assembly. For your own code provided the source code is in the project it should take you right to the source code. Note that ...Show All
SQL Server Default value for lookup
How can I specify a default value to return into the lookup field for Lookup Transformation - if the value did not found on the Reference Table Do I have to this another way (after doing the lookup) /Yossi D. Perhaps you could go to the Advanced tab and adjust the lookup query SQL to return a default value. (I haven't tried it.) Or Set the error option to ignore, so your rows that failed to return a value just flow down the main output with null values. You can then use a Derived Column to test for NULL and assign the default value. ...Show All
Visual Studio Team System Strange checkin policy error
I have setup a code analysis checkin policy on a Team project, I have a solution where I have migrated code analysis settings so I know they are as stringent as the checkin policy and a build of that solution has succeeded. However when I make a change to one of the projects in my solution and try and checkin after a successful build I get the following policy error: TF10139:The following policies have not been satisfied Internal error in Ensures that code analysis is run with a predefined set of rules This project that is having problems is one where I have significantly changed the contents of the .csproj file as it is in msbuild ...Show All
Windows Forms using OWC(Office Web components) charts in windows app
hi, I am using OWC to create charts. I have following questions: 1) How can I get msdn Help about various fuinctions/properties of OWC classes when I press F1 Rite now, I have 2003 msdn installed and when I press F1 in my VS.net, it is unable to find help. 2) Can I have OWC controls in "ToolBox" in VS.net so thatI can drag ...Show All
.NET Development Same Membership Table Different Roles/Profiles
Hi, is it possible, using either the SQLMembership Provider, or tweaking it, to have the same Membership table, but having different Roles per application Scenario: Imagine a Company Intranet. I want 1 users table for Intranet. Image i create another application on the Intranet. I want this application to be authenticated against the 1 user store, but this application to have different Role data, and possible different profile data. Using SQLMembership provider, i know if i put the same application name, i can share memebership data, but this also shares role/profile data. how can i tweak this to suit my requirements do i have to c ...Show All
.NET Development Dealing with an offline SAO
I have a client that invokes an single call SAO hosted on a NLB cluster. The SAO hosts a finite resource, under certain conditions it will need to delegate to another server (in a way acting like a client). If I take down a server, the client is directed to a 'good' SAO, but delegation won't stop the server carrying out its resource checks, invoking a request to an offline server. The timeout on this synchronous request is LONG (I've not found a way to change it), so I've considered asynchronous requests with timeout to hear back. I'd be concerned if I'm re-inventing the wheel. Am I on the right track Is there a design pattern I should be ...Show All
Visual C# Casting when type to cast to is only known at runtime
Lets say I have 2 types - TypeA and TypeB. There are times that I need to handle these types generically as objects so I can cast to an object no problem. However when I need to cast back to a specific type from an object I have some issues. I can do the following OK if I know at design time the type of the object: (TypeA)SomeObject However, if I only know the type of the object at runtime, how do I define the cast at design time. If I want to cast back to the actual object type which I can get from Type t = SomeObject.GetType() how can I declare the cast to t in my code (t)SomeObject fails at compile ...Show All
