Click here to Skip to main content
15,915,632 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: Strange Error on Data Bound ComboBox Pin
led mike14-Mar-08 4:58
led mike14-Mar-08 4:58 
GeneralRe: Strange Error on Data Bound ComboBox Pin
Brady Kelly16-Mar-08 22:27
Brady Kelly16-Mar-08 22:27 
GeneralRe: Strange Error on Data Bound ComboBox Pin
ChandraRam17-Mar-08 0:37
ChandraRam17-Mar-08 0:37 
GeneralRe: Strange Error on Data Bound ComboBox Pin
Brady Kelly17-Mar-08 1:36
Brady Kelly17-Mar-08 1:36 
QuestionAlpha-Blending controls Pin
Zerox MXI12-Mar-08 23:43
Zerox MXI12-Mar-08 23:43 
GeneralRe: Alpha-Blending controls Pin
Martin#13-Mar-08 1:18
Martin#13-Mar-08 1:18 
QuestionHow to create Dynamic table? Pin
Guru_yogi12-Mar-08 20:42
Guru_yogi12-Mar-08 20:42 
AnswerRe: How to create Dynamic table? Pin
John_Adams12-Mar-08 21:53
John_Adams12-Mar-08 21:53 
Hi,

You should try using the DataGridView control. It provides numerous basic and advanced features that are missing in the DataGrid control. Additionally, the architecture of the DataGridView control makes it much easier to extend and customize than the DataGrid control.

The following are the primary features available in the DataGridView control that are missing from the DataGrid control.

DataGridView control feature


Multiple column types


The DataGridView control provides more built-in column types than the DataGrid control. These column types meet the needs of most common scenarios, but are also easier to extend or replace than the column types in the DataGrid control.

Multiple ways to display data


The DataGrid control is limited to displaying data from an external data source. The DataGridView control, however, can display unbound data stored in the control, data from a bound data source, or bound and unbound data together. You can also implement virtual mode in the DataGridView control to provide custom data management.

Multiple ways to customize the display of data

The DataGridView control provides many properties and events that enable you to specify how data is formatted and displayed. For example, you can change the appearance of cells, rows, and columns depending on the data they contain, or you can replace data of one data type with equivalent data of another type.

Multiple options for changing cell, row, column, and header appearance and behavior


The DataGridView control enables you to work with individual grid components in numerous ways. For example, you can freeze rows and columns to prevent them from scrolling; hide rows, columns, and headers; change the way row, column, and header sizes are adjusted; change the way users make selections; and provide ToolTips and shortcut menus for individual cells, rows, and columns.

Below is small code snippet showing how we can bind the grid to a data source

BEGIN CODE

private void Form1_Load(object sender, EventArgs e)

{

// TODO: This line of code loads data into the 'nwindDataSet.Customers' table. You can move, or remove it, as needed.

this.customersTableAdapter.Fill(this.nwindDataSet.Customers);

customersDataGridView.DataSource = nwindDataSet;

customersDataGridView.DataMember = "Customers";

customersDataGridView.Sort(customersDataGridView.Columns["ContactName"], ListSortDirection.Ascending);

}
END CODE

I hope this helps Smile | :) .

Regards,
John Adams
ComponentOne LLC

GeneralSeeking directions for building own custom controls and about UI programming Pin
Zerox MXI12-Mar-08 15:17
Zerox MXI12-Mar-08 15:17 
GeneralRe: Seeking directions for building own custom controls and about UI programming Pin
led mike13-Mar-08 4:22
led mike13-Mar-08 4:22 
GeneralSend Page by email ( in the right forum now i hope ) :) Pin
cechode12-Mar-08 11:30
cechode12-Mar-08 11:30 
GeneralRe: Send Page by email ( in the right forum now i hope ) :) Pin
led mike13-Mar-08 4:26
led mike13-Mar-08 4:26 
GeneralRe: Send Page by email ( in the right forum now i hope ) :) Pin
cechode13-Mar-08 5:37
cechode13-Mar-08 5:37 
GeneralRe: Send Page by email ( in the right forum now i hope ) :) Pin
led mike13-Mar-08 6:03
led mike13-Mar-08 6:03 
GeneralNewbie trying to get a grasp Pin
Aazzin12-Mar-08 3:10
Aazzin12-Mar-08 3:10 
GeneralRe: Newbie trying to get a grasp Pin
James J. Foster12-Mar-08 11:58
James J. Foster12-Mar-08 11:58 
GeneralCombo box not getting populated .there is no Problem with The code Pin
Ramya Bhaskaran11-Mar-08 20:05
Ramya Bhaskaran11-Mar-08 20:05 
GeneralRe: Combo box not getting populated .there is no Problem with The code Pin
darkelv11-Mar-08 23:29
darkelv11-Mar-08 23:29 
GeneralRe: Combo box not getting populated .there is no Problem with The code Pin
Sabarinathan T13-Mar-08 4:02
Sabarinathan T13-Mar-08 4:02 
QuestionGridView customization to group columns Pin
spd11-Mar-08 9:11
spd11-Mar-08 9:11 
GeneralForms and Namespaces Pin
weirbear11-Mar-08 5:19
weirbear11-Mar-08 5:19 
GeneralRe: Forms and Namespaces Pin
Pete O'Hanlon11-Mar-08 5:24
mvePete O'Hanlon11-Mar-08 5:24 
GeneralRe: Forms and Namespaces Pin
weirbear11-Mar-08 5:42
weirbear11-Mar-08 5:42 
GeneralRe: Forms and Namespaces Pin
led mike11-Mar-08 5:53
led mike11-Mar-08 5:53 
GeneralRe: Forms and Namespaces Pin
weirbear11-Mar-08 5:59
weirbear11-Mar-08 5:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.