MattMattMattMattMatt's Q&A profile
Windows Forms Preventing a user from typing in a datagrid ?
Hi, I have a normal vb.net datagrid. I do not want the user to enter any value in the first column of the grid. At the same time I cannot set it to readonly= true for some reason. How can I prevent the user from entering any value into the cells of only that column The keypress or keydown events of the datagrid are not working. Can you please help me. Prasad I think the right course of action should ...Show All
Visual Studio 2008 (Pre-release) CompositeCollection not working with HierarchicalDataTemplate
I'm trying to build a TreeView that binds to a custom object I have. Here's a quick outline of my class structure: class TopLevel List<Category> Categories class Category string Name List<Category> Categories List<Channel> Channels class Channel string Name So, the TreeView starts by parsing the top level set of Categories. The subnodes will be the list of categories it contains AND the list of channels. The subcatego ...Show All
.NET Development Pattern for Sharing Transactions on ADO.NET 1.x
Hello- I have a heirarchical object structure. A similar object structure would be a Customer that has multiple Orders and each Order has multiple Items. Each object has a Persist method that, depending on whether or not the object is new, will either insert or update it in the database. What I want to be able to do is save a Customer or Order and have it and all of its child items saved within the same transaction. So, I've changed my Per ...Show All
Windows Forms DataGridView Multi-Sort Option
Hello to All. I'm trying to implement a multi sort option in dataGridView. I can do it by creating a new SelectCommand and rebind it to the control, by this approach have 2 disadvantages: 1. On big database, rebind data is a heavy command, and ...Show All
SQL Server Wing Dings changed when exported to PDF
I have a report that requires checkboxes. I used the wingdings font to accomplish this but I need to have the print format to be pdf. When the file is exported the boxes become stars and the checkboxes become rectangles. Which font should I use or if there is some code that I need to add to have the report appear as designed. Thanks Don't use wingdings. Set borders on a textbox with the ri ...Show All
.NET Development GetOleDbSchemaTable question
Hey all, I was wondering about the GetOleDbSchemaTable method of the OleDbConnection class. The parameters that you pass in are confusing me, could someone please explain to me the parameters: Guid Schema and object[] restrictions Thanks for the help The Guid Schema parameter is described here: OleDbSchemaGuid Members http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpref/html/frlrfsystemd ...Show All
.NET Development delete XML node with JavaScript/JScript
[code]function loadXML(){ var bOneway = document.form.oneWay.value; var bReturn = document.forms["form"].elements["return"].value; var bOpenjaw = document.form.openJaw.value; var xmlDoc = new ActiveXObject("MSXML2.DOMDocument.3.0"); xmlDoc.async="false"; { ================================== removed unnecessary code ================================== } // If the XML document has been comp ...Show All
.NET Development How to catch the exception of remote server close down?
I have a client/server application using remoting. It works fine. But when I close the server, the client will become hanging over in the middle of an exception dialog(view details, continue, quit one) display. Only if I re-start the sever, the exception dialog become clickable and exception contents are displayed. It says the connection to the remote server is closed. The worst is I cannot using try-catch block to catch this exception. Who c ...Show All
Visual Basic DATA SOURCES are missing from Data Source Window
I've this happened twice! I'm using VB.net 2005 working on two projects (BO and UI), do debug on the project, when suddenly all Data Sources on my UI are missing! Does anybody know what caused this and what is the solution!! I hate to restore from my backup whenever this happens. Thank you for your help in advance. Handoko Widjaja ...Show All
Visual Studio Team System How we make ViewState Dynamic
System is giving me ViewState Error when I run the Script recorded in Machine A and run it on Machine B. When I see the view state of the page (where it is failing) it has hard coded value while recording. How do we make it dynamic I tried to extract hidden value from previous page and try to paramatize this hidden value on the hard coded value, it is not working. It still says invalid view state. Please help me, how can we ...Show All
SQL Server Merge Replication Problems
I am having a heck of a time trying to get merge replication to work. I have two tables that consistently fail validation - even just rowcount after applying a snapshot that I created seconds before and at a time when there is no activity on the tables. Is there a guide/info somewhere about how to troulbeshoot this The tables are fairly straightforward (but 35,000 rows) and there are no filters set up. The remote database is connected over th ...Show All
Visual Studio Problems with SetDataSource
hello, i have created some reports with crystal. Form_Load of my Form : [code] // my Class loads a DataSet AntragReparaturs antrag1 = new AntragReparaturs(); DataSet set1 = antrag1.Report_RepAnnahme_Kunde_GetData( this .antragsID4Edit); // Instance of my report Report_RepAnnahme_Kunde rep1 = new Report_RepAnnahme_Kunde(); // SetDataSource on DataSet rep1.SetDataSource(set1.Tables[ 0 ]); crystalReportV ...Show All
Visual Basic Can't understand delegate function
I'm reading Wrox's Professional VB 2005. I'm just at the beginning of delegates. It has us open a module1 and put in the following code: Public Delegate Function Compare(ByVal v1 As Object, ByVal v2 As Object) As Boolean Public Sub DoSort(ByVal theData() As Object, ByVal greaterThan As Compare) Dim outer As Integer Dim inner As Integer Dim temp As Object For outer = 0 To UBound(theData) - 1 For inner = outer + 1 To UBound ...Show All
Visual C# How to resize an image programmatically?
How can I programmatically enlarge an image with the original image placed at the left bottom corner, and the enlarged area filled with specific color Thank a lot. public Bitmap ResizeBitmap( string filepath, int width, int height) { Image originalImage = Image.FromFile( filepath ); Bitmap result = new Bitmap(width, height); using (Graphics g = Graphics.FromImage( result )) using (SolidBrush brush = new SolidBrush(Colo ...Show All
Visual FoxPro include file conflict
I just found out that if I wanted to include two .h (header) files in a form the second one kicked the first one out. Is it only my wrong perception or it is supposed to be this way Thanks. The problem here with your approach which I tried first as well is the scope: If you place #DEFINE within an event or method procedure in a form, the #DEFINE compile-time constant is available within the event or method procedure. Additionally, it ...Show All
