VB.NET, C#
This sample, created mainly by using the Grid Designer instead of using code shows a basic grid that takes advantage of the fact that every grid element behaves as if it were a separate control. The sample highlights cells when the mouse moves over them, turns rows red if bad data was entered, allows you to drag & drop from a cell to/from a label on the form or to/from another (drag and drop enabled) application altogether. It also allows you to change the values of a cell by click & dragging on it upwards or downwards.
There is a text row at the bottom of the grid presented by the sample which tells you what you can do as your mouse moves over the grid's elements.
The grid elements in the sample subscribe to various of the grid's events right from the Grid Designer – you can observe this, in C#, by selecting a grid element and going to the property page's "events" tab. In VB.NET, go into the code editor and select the desired grid element from the left combo box and the desired event from the right combo box. This is done in the same way as, for example, adding the DoubleClick event for a ListBox control.
Custom painting through the use of the Paint event
Handling various mouse events (including capturing mouse movement)
Handling keyboard events
Handling the LeavingEdit event
Handling 'Drag and Drop'-related events (including the AllowDrop property)
Displaying the GenerateReportForm to create reports
When you run the sample, move the mouse pointer over the various grid elements to obtain a brief explanation of what the sample can demonstrate.
C#: Xceed Samples\Xceed Grid for WinForms v#.#\CSharp\GridElements\GridElementsCS.csproj
VB.NET: Xceed Samples\Xceed Grid for WinForms v#.#\Visual Basic .NET\GridElements\GridElementsVB.vbproj