|
|
|
|
|
Total Hits: 11 | Today: 0
|
Author: David Zenou
|
Rating:
|
|

The GridView control is a very powerful and scalable .net control. You use it inside some application to list entites. However , there is a disadvantage when you want to use the Paging implementation : you must systematically bind the gridview with a select of all data when you change the index to see the other pages. So Imagine that you must work with a datasource with 400 000 records : the postback is expensive , the treatment is not optimized....
|
|
|
|
Total Hits: 15 | Today: 0
|
Author: Fabio Franco
|
Rating:
|
|

I decided to create a new ComboBox based on requests of users of MSDN Windows Forms forum. It adds a new property to the regular ComboBox so it can be set to Read-Only, much like the regular TextBoxes. I made this code pretty straightforward so all you have to do is download the cs file enclosed in the ZIP file above and add it to your project. Build it and the ExComboBox should be available on the ToolBox. You can change the way the disabled button looks by commenting the ComboBoxRenderer line ...
|
|
|
|
Total Hits: 28 | Today: 1
|
Author: Sridhar Subramanian
|
Rating:
|
|

This approach helps us not to customize our Data Access Layer for different type of data classes. Consider we have some "Data class" in our application and we want the data class to act as a collection, Generally what we do is declare a "Generic List" (New feature in 2.0) of that data class type and populate our data list from the database. For populating the list, we loop through the data class with customized code and add the class to our list collection. This will be tedious and time consumi...
|
|
|
|
Total Hits: 69 | Today: 0
|
Author: yordan_georgiev
|
Rating:
|
|

This article is aimed for those who quickly need to create entirely dinamic DropDownList in C#. So if you asked google how-to create dynamic dropdown in C# with DataTable / DataSet you are on the right track .... There are many other sources as well as methods, this one simply assumes that you receive from database or whatever else data source a dataset and you do create the dymamic dropdown list at once ... Copy paste the code - ensure that your environment answers the requirements presented ab...
|
|
|
|
Total Hits: 14 | Today: 0
|
Author: kevinuni
|
Rating:
|
|

A very common problem in winform applications occurs when data should be exported from DatagridView to Excel, there's some commercial workarounds to solve this problem. This article describe a simple versatile and free way to do. The work to exporting to Excel is made by "Office XP Primary Interop Assemblies (PIAs)" Initially, the data is obtained from datagridview's datasource, formated and then exported to a excel file throw Excel COM Interiop. The Datagridview datasource could be : * A...
|
|
|
|
Total Hits: 12 | Today: 0
|
Author: Sergey Stoyan
|
Rating:
|
|

Some applications need a more advanced message box than MessageBox class provided by .NET. This article presents a .NET library called MessageForm that can be used instead of .NET MessageBox getting more features and improvements. MessageForm class implements the message box window basing on System.Windows.Forms.Form. Usually you do not want to use it because of using Message class instead. On the other hand, MessageForm provides more flexible settings than Message does....
|
|
|
|
Total Hits: 20 | Today: 0
|
Author: M Palmér
|
Rating:
|
|

It extends the ListView control and adds an EnsureVisible method to scroll horizontally to a subitem. I often use The Code Project to find good samples, but I didn't find one for this. So I just want to give something back. This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)...
|
|
|
|
Total Hits: 17 | Today: 0
|
Author: Scott Lysle
|
Rating:
|
|

This article describes an easy approach to building a simple word processor around an extended version of the Rich Text Box (RTB) control; Microsoft has made available an extended version of the RTB control that greatly eases the requirements for printing the control's text or RTF content. This article and the sample application will use this extended version of the RTF control to demonstrate the following word processor related functions: *Opening Text, RTF, HTML, or other text files int...
|
|
|
|
Total Hits: 16 | Today: 1
|
Author: maxcarey
|
Rating:
|
|

Having spent two years dabbling with C# ASP.NET programming, I have picked up countless insights, many of which I always wish I had a chance to write down and share, for my benefit as much as for others, as I often forget a few months down the line what it is that actually got me wanting to write something down in the first place. In the end, though, I never have the time or the inclination, or it would just take too long to explain the background behind the insight to make it worth the effort....
|
|
|
|
Total Hits: 18 | Today: 0
|
Author: Ahmed R El Bohoty
|
Rating:
|
|

One of the most questions asked to me, how to fill dataGridview Using DataReader, if you note the behavior of DataReader you will note that when you read using DataReader you read row by row so you you make looping to read all records if you want to display all record or any element from record , in other hand dataGridview need to take all data of your records in one package, so the solution is to make centralize store by make class that contains properties and set value for each properties when...
|
|
|
|
Total Hits: 14 | Today: 1
|
Author: John Boero
|
Rating:
|
|

Every now and then someone on a forum asks about rendering video or DirectX or OpenGL to a ListView background. Most often, they are shot down by an emphatic "impossible" unless the user is open to overlays. Overlays quietly disappeared in Vista Aero. This is what crippled the wallpaper modes of the video players VLC and BSPlayer. It also happened to cripple a slick ListView I used on some Quadro cards to render some background underlays. This control implements ListView the way it was meant to ...
|
|
|
|
Total Hits: 22 | Today: 1
|
Author: HU Lihui
|
Rating:
|
|

If you want to set row or cell backcolor in your custom DataGridView control, you may have many methods, such as customizing column, using DefaultCellStyle, etc..Here we introduce a method by way of .NET event. The realized steps include: define CellBackColorEventArgs class, customize DataGridView control with SetCellBackColor event, override OnCellPainting method, draw cell BackColor if the event has been subscribed....
|
|
|
|
|
|