.net

How do I make a DataGridView that doesn't snap its rows to the top of the control?

We've used the DataGridView extensively in our client. Our customers want to be able to enter large amounts of text into a row - too much to be displayed in the height of the DataGridView - and scroll through them using the main scrollbar - i.e. the DataGridView's scrollbar. However, the DataGridView will only scroll such that a row is...

.NET WCF Can't Decode "Chunked" response.

I am calling an axis web service from WCF. The request works just fine but I get back null values. Using Fiddler I was able to determine that the response is coming base as Transfer-Encoding: chunked. This means that there are control characters in in the response BEFORE the xml. WCF does NOT throw an error. It just moves on and the...

regular expression $ in .net framework

I try to test regular expression $ anchor using .net framework, the result is unexpected. The $ anchor only return the last one. I note the multiline switch is important, and I already used it here. Can anyone tell the reason. Following is my test code Thanks Fred string sourceText = @"ab<br /> ab<br /> ab"; //var m =...

Running .NET Form fullscreen

I'd like my application to be run as "fullscreen" much like a powerpoint presentation is ran. The title bar is gone and the menu bar is also gone. I dont think it should be too complicated but I just can't find how to do it ...

Generating XSD schemas for .NET classes

I have a set of classes which hold only data (no operations have been defined in this class). How do i generate a xsd file for these classes? ...

.NET Entity Framework

Is it bad practice to use the code-gen'ed objects from Entity Framework as business objects? Or is it better to write a secondary wrapper around Entity Framework objects that I would then pass between layers? For example, write my own POCO Person that accepts one of my code-gen'ed Entity Framework object EFPerson to initialize the POCO ...

Winforms MenuStrip Underlined Hotkey Letter

Typically the hotkey letters on a MenuStrip are underlined. (&File, &Open, etc) On a project I'm working on the underline shows up in the designer, but not at run time. I can't find the property that controls this. Anyone out there know? ...

Determining the source of a thread

I've been experiencing a high degree of flicker and UI lag in a small application I've developed to test a component that I've written for one of our applications. Because the flicker and lag was taking place during idle time (when there should--seriously--be nothing going on), I decided to do some investigating. I noticed a few threads ...

Dynamic class creation.

Hi, we have a data-layer which contains classes generated by outputs (tables/views/procs/functions) from database. The tables in database are normalized and are designed similar to OOP design ( table for "invoice" has 1:1 relation to table for "document", table for "invoice-item" has 1:1 relation to table for "document-item", etc...". A...

Loop in stored procedure or in client code

From an efficiency and best practices point of view, I appreciate everyones thoughts. I have a stored procedure that makes (n) copies of a row and inserts the row into the necessary table. For example. Make a copy of an inventory item and add the copies to inventory. I see two options for this type of stored procedure. Option 1: CR...

C++/CLI Finalizers and Operators

In the following example, I get: error C2300: 'UnmanagedClass' : class does not have a finalizer called '!SmartPointer' If I remove the operator->, this error goes away. Could someone explain why this is happening? // Unmanaged class. class UnmanagedClass { }; public ref class SmartPointer { public: SmartPointer(UnmanagedClass*...

How to read resource of asp.net page from utility class

I need to get a string from resource file of page from utility class. I tried ResourceManager resources = new ResourceManager( "Company.Application.Folder.App_LocalResources.Page.aspx", Assembly.GetExecutingAssembly()); string value = resources.GetString("ResourceName"); ...

Putting XML Data into the Windows Event Log

Hello: I have noticed that there is some way to insert XML into the windows event log (and not by just stuffing it into the description). The effect is that you get just your description message in the General view (windows Vista), and you can see your XML data in the Details View (If you select the "Friendly" radio button, it appears u...

.NET Garbage Collector - what is its thread priority?

I have found some great articles (Maoni, Richter #1, Richter #2) giving many details as to the theory and practice of the GC, yet I cannot find anything that states how the GC's thread priority is set. The closest I've found is this one that states that the Finalizer thread "runs asynchronously to the application and at a high priority....

Merge Excel Files Into One

I have a few hundred Excel files, where each file has some data on the first sheet. I've been asked to write a console application in C# which merges all of the Excel files together into a single document while retaining the formatting. The consolidated file is a single workbook containing a sheet for each file merged into the document....

thread with multiple parameters

Does anyone know how to pass multiple parameters into a Thread.Start routine? I thought of extending the class, but the C# Thread class is sealed. Here is what I think the code would look like: ... Thread standardTCPServerThread = new Thread(startSocketServerAsThread); standardServerThread.Start( orchestrator, initializeMembe...

UniData Data Access Products for .NET

I am doing some research about how to access data in a UniData database from .NET code. From what I have found, I can use UniObjects for .NET and U2.NET. I have also found this information, which I think is possible by using U2.NET, but I'm not quite sure. I am also unsure as to the cost of these products, and if they are free, how to ...

Best Practices for asynchronous calls in MVP with WinForms

I am using the Model-View-Presenter pattern in a WinForms project and one problem (among many) that I am having is when the form tells the presenter to do something and then is un-reactive while the presenter goes of to do it. Fortunately in my project I have no problem with making all presenter calls asynchronous the question is how ex...

C# RegEx match beginning of string and beginning of word simultaneously

Hello, Say there are six strings "abcd bbb ccc" "abce bbb ccc" "abcf bbb ccc" "aaa abcd ccc" "aaa abce ccc" "aaa abcf ccc" User enters expression "<abc[!e]" This expression gets translated into following regex "^abc[^e]" Translated regex would successfully match strings 1 and 3 If I wanted to match strings 4 and 6 the expression ...

DataBind and Postback

This is a general how does DataBind work questions... I have a simple page with a GridView that is bound (in the aspx code) to an ObjectDataSource. I can look in the Select() function called by the ObjectDataSource to see that it is called on the initial load and on every post back. I have some logic that happens on post backs that wi...