Introduction to Microsoft Windows Forms DataGrid Control.

32
Introduction to Introduction to Microsoft Windows Microsoft Windows Forms DataGrid Forms DataGrid Control Control

Transcript of Introduction to Microsoft Windows Forms DataGrid Control.

Page 1: Introduction to Microsoft Windows Forms DataGrid Control.

Introduction to Introduction to Microsoft Windows Microsoft Windows Forms DataGrid ControlForms DataGrid Control

Page 2: Introduction to Microsoft Windows Forms DataGrid Control.

2

AgendaAgenda Introduction to Microsoft® Windows® Form Introduction to Microsoft® Windows® Form

DataGridDataGrid Microsoft Visual Basic® 6.0 DataGrid vs. Microsoft Visual Basic® 6.0 DataGrid vs.

Windows Forms DataGrid Windows Forms DataGrid Properties, methods, and events Properties, methods, and events Databinding and navigationDatabinding and navigation Managing DataGrid appearance Managing DataGrid appearance Capturing clicks Capturing clicks Adding controlsAdding controls Frequently asked DataGrid questions Frequently asked DataGrid questions Additional referencesAdditional references QuestionsQuestions

Page 3: Introduction to Microsoft Windows Forms DataGrid Control.

3

Introduction to Windows Form Introduction to Windows Form DataGridDataGrid

Displays data in a series of rows and Displays data in a series of rows and columnscolumns

User interface for a datasetUser interface for a dataset Hierarchical navigationHierarchical navigation Formatting and editing capabilitiesFormatting and editing capabilities

NOTE: The control handles the user interface, NOTE: The control handles the user interface, while data updates are handled by the while data updates are handled by the Windows Forms databinding architecture and Windows Forms databinding architecture and by ADO.NET data providersby ADO.NET data providers

Page 4: Introduction to Microsoft Windows Forms DataGrid Control.

4

Visual Basic 6.0 DataGrid vs. Visual Basic 6.0 DataGrid vs. Windows Forms DataGridWindows Forms DataGrid Microsoft .NET DataGrid control does not need Microsoft .NET DataGrid control does not need

data-specific methods or events because all data-specific methods or events because all actions are performed through the data sourceactions are performed through the data source

Visual Basic 6.0 Visual Basic 6.0 DataGridDataGrid

Visual Studio .NET Visual Studio .NET DataGridDataGrid

AllowAddNewAllowAddNew Accessed through AllowNew property of DataView classAccessed through AllowNew property of DataView class

AllowDelete AllowDelete Accessed through AllowDelete property of DataView Accessed through AllowDelete property of DataView class class

AllowUpdate AllowUpdate Accessed through AllowEdit property of DataView class Accessed through AllowEdit property of DataView class

ApproxCount ApproxCount Returned by BindingContext object; accessed through Returned by BindingContext object; accessed through Count property of the BindingManagerBase class Count property of the BindingManagerBase class

Bookmark Bookmark Data is disconnected and items can be accessed directlyData is disconnected and items can be accessed directly

FirstRow FirstRow Set Position property to 0 on BindingManagerBase object Set Position property to 0 on BindingManagerBase object

CurrentCellModified CurrentCellModified RowState property on DataRow object RowState property on DataRow object

Page 5: Introduction to Microsoft Windows Forms DataGrid Control.

5

Properties, Methods, and EventsProperties, Methods, and Events

PropertiesProperties CurrentCellCurrentCell CurrentRowIndexCurrentRowIndex DataSourceDataSource DataMemberDataMember PreferredColumnWidthPreferredColumnWidth PreferredRowHeightPreferredRowHeight TableStyles *TableStyles *

Page 6: Introduction to Microsoft Windows Forms DataGrid Control.

6

Properties, Methods and Events Properties, Methods and Events (2)(2)

MethodsMethods SetDataBindingsSetDataBindings BeginEditBeginEdit EndEditEndEdit GetCurrentCellBoundsGetCurrentCellBounds HitTestHitTest * * SelectSelect UnselectUnselect

EventsEvents CurrentCellChangedCurrentCellChanged KeyDown, KeyPress, KeyUpKeyDown, KeyPress, KeyUp ShowParentDetailsShowParentDetails

Page 7: Introduction to Microsoft Windows Forms DataGrid Control.

7

Windows Forms DataBinding Windows Forms DataBinding ArchitectureArchitecture Databinding in Windows Forms permits you Databinding in Windows Forms permits you

to display and make changes to information to display and make changes to information from a data source in controls on the formfrom a data source in controls on the form

You can bind not only to conventional data You can bind not only to conventional data sources, but also to almost any structure that sources, but also to almost any structure that contains datacontains data

You can bind any property of any control to You can bind any property of any control to the DataSourcethe DataSource

Page 8: Introduction to Microsoft Windows Forms DataGrid Control.

8

Providers of Data to Windows Providers of Data to Windows FormsForms

DataTable DataTable DataView DataView DataSet DataSet DataViewManager DataViewManager Single dimensional arraySingle dimensional array

Page 9: Introduction to Microsoft Windows Forms DataGrid Control.

9

Design Time DatabindingDesign Time Databinding

Bind DataGrid control to a data source Bind DataGrid control to a data source using the DataSource and DataMember using the DataSource and DataMember propertiesproperties

Page 10: Introduction to Microsoft Windows Forms DataGrid Control.

10

Sample Code: Run Time Sample Code: Run Time DatabindingDatabindingImports System.Data.SqlClient Imports System.Data.SqlClient

‘‘Create a DataSet ObjectCreate a DataSet Object

ds = New DataSet("Customers") ds = New DataSet("Customers")

Dim cString As string = “ConnectionString” Dim cString As string = “ConnectionString”

Dim cn As SqlConnection = New SqlConnection(cString)Dim cn As SqlConnection = New SqlConnection(cString)

cn.Open() cn.Open()

Dim cmd As SqlCommand = New SqlCommand("SELECT * FROM Suppliers")Dim cmd As SqlCommand = New SqlCommand("SELECT * FROM Suppliers")

cmd.Connection = cncmd.Connection = cn

cmd.CommandType = CommandType.Textcmd.CommandType = CommandType.Text

Dim ad As SqlDataAdapter = New SqlDataAdapter() Dim ad As SqlDataAdapter = New SqlDataAdapter()

ad.SelectCommand = cmdad.SelectCommand = cmd

' A table mapping tells the adapter what to call the table.' A table mapping tells the adapter what to call the table.

ad.TableMappings.Add("Table", "Suppliers") ad.TableMappings.Add("Table", "Suppliers")

ad.Fill(ds)ad.Fill(ds)

DataGrid1.DataGrid1.SetDataBindingSetDataBinding(ds, "Suppliers") (ds, "Suppliers")

Page 11: Introduction to Microsoft Windows Forms DataGrid Control.

11

Master-Details ListsMaster-Details Lists

Page 12: Introduction to Microsoft Windows Forms DataGrid Control.

12

Sample Code: Master-Details Sample Code: Master-Details ListsLists

You can use two DataGrids to display data in You can use two DataGrids to display data in a Master-Detail format a Master-Detail format

Sample code:Sample code:Dim DR As DataRelationDim DR As DataRelationDR = New DataRelation("CustOrd", _ DR = New DataRelation("CustOrd", _

ds.Tables("Customers").Columns("CustomerID"), _ ds.Tables("Customers").Columns("CustomerID"), _ ds.Tables("Orders").Columns("CustomerID"))ds.Tables("Orders").Columns("CustomerID"))

' ' Add the relation to the DataSet.Add the relation to the DataSet.

ds.Relations.Add(DR)ds.Relations.Add(DR)

GridCustomers.SetDataBinding(ds,"Customers")GridCustomers.SetDataBinding(ds,"Customers")

GridOrders.SetDataBinding(ds,"Customers.CustOrd") GridOrders.SetDataBinding(ds,"Customers.CustOrd")

Page 13: Introduction to Microsoft Windows Forms DataGrid Control.

13

Parent-Child RelationshipParent-Child Relationship

Page 14: Introduction to Microsoft Windows Forms DataGrid Control.

14

Sample Code: Parent-Child Sample Code: Parent-Child RelationshipRelationship

Dim relcustorder As DataRelationDim relcustorder As DataRelation

Dim parentcol, childcol As DataColumnDim parentcol, childcol As DataColumn

Dim cn As SqlConnection = New SqlConnection(“ConnString”)Dim cn As SqlConnection = New SqlConnection(“ConnString”)

cn.Open()cn.Open()

Dim DA As SqlDataAdapter = New SqlDataAdapter("Select * FROM Dim DA As SqlDataAdapter = New SqlDataAdapter("Select * FROM Customers;Select * from Orders", cn)Customers;Select * from Orders", cn)

DA.TableMappings.Add("Customers1", "Orders")DA.TableMappings.Add("Customers1", "Orders")

DA.Fill(MyDS, "Customers")DA.Fill(MyDS, "Customers")

' Define Columns and Create Relationship' Define Columns and Create Relationship

Parentcol = MyDS.Tables("Customers").Columns("CustomerID")Parentcol = MyDS.Tables("Customers").Columns("CustomerID")

childcol = MyDS.Tables("Orders").Columns("CustomerID")childcol = MyDS.Tables("Orders").Columns("CustomerID")

relcustorder = New DataRelation("CustomersOrders“, parentcol, childcol)relcustorder = New DataRelation("CustomersOrders“, parentcol, childcol)

' Add the relation to the DataSet.' Add the relation to the DataSet.

MyDS.Relations.Add(relcustorder)MyDS.Relations.Add(relcustorder)

DataGrid1.DataSource = MyDS.Tables("Customers")DataGrid1.DataSource = MyDS.Tables("Customers")

Page 15: Introduction to Microsoft Windows Forms DataGrid Control.

15

Currency ManagerCurrency Manager

Page 16: Introduction to Microsoft Windows Forms DataGrid Control.

16

Currency ManagerCurrency Manager (2) (2)

Keeps track of the position and otherwise Keeps track of the position and otherwise supervises bindings to that data sourcesupervises bindings to that data source

Each DataSource is associated with a Each DataSource is associated with a CurrencyManagerCurrencyManager

If the controls on the form all bind to a single If the controls on the form all bind to a single source, then they will share the same source, then they will share the same CurrencyManager CurrencyManager

Position property of CurrencyManagerPosition property of CurrencyManager

Page 17: Introduction to Microsoft Windows Forms DataGrid Control.

17

Sample Code: Currency ManagerSample Code: Currency Manager

Private myCM As CurrencyManager Private myCM As CurrencyManager Private Sub Private Sub BindControlBindControl(myTable As DataTable)(myTable As DataTable)' Bind a TextBox control to a DataTable column in a DataSet. ' Bind a TextBox control to a DataTable column in a DataSet. TextBox1.DataBindings.Add("Text", myTable, "CompanyName")TextBox1.DataBindings.Add("Text", myTable, "CompanyName")' Specify the CurrencyManager for the DataTable. ' Specify the CurrencyManager for the DataTable. myCM = CType(me.BindingContext(myTable), CurrencyManager)myCM = CType(me.BindingContext(myTable), CurrencyManager)' Set the initial Position of the control.' Set the initial Position of the control.myCM.Position = 0 myCM.Position = 0 End Sub End Sub ‘‘Code for NavigationCode for NavigationPrivate Sub Private Sub MoveNextMoveNext(myCM As CurrencyManager)(myCM As CurrencyManager) If myCM.Position = myCM.Count - 1 Then MessageBox.Show("You're If myCM.Position = myCM.Count - 1 Then MessageBox.Show("You're

at end of the records") at end of the records") ElseElse myCM.Position += 1 myCM.Position += 1 End If End If End SubEnd Sub

Page 18: Introduction to Microsoft Windows Forms DataGrid Control.

18

Sample Code: Currency ManagerSample Code: Currency Manager (2) (2)

Private Sub Private Sub MoveFirstMoveFirst(myCM As CurrencyManager) (myCM As CurrencyManager)

myCM.Position = 0 myCM.Position = 0

End Sub End Sub

Private Sub Private Sub MovePreviousMovePrevious(myCM As CurrencyManager) (myCM As CurrencyManager)

If myCM.Position = 0 Then If myCM.Position = 0 Then

MessageBox.Show("You're at the beginning of the records.") MessageBox.Show("You're at the beginning of the records.")

Else Else

myCM.Position -= 1 myCM.Position -= 1

End if End if

End SubEnd Sub

Private Sub Private Sub MoveLastMoveLast(myCM As CurrencyManager) (myCM As CurrencyManager)

myCM.Position = myCM.Count - 1 myCM.Position = myCM.Count - 1

End Sub End Sub

Page 19: Introduction to Microsoft Windows Forms DataGrid Control.

19

Managing DataGrid AppearanceManaging DataGrid Appearance

System.Windows.Forms.DataGrid

DataGridTableStyle Class

DataGridColumnStyleClass

DataGridTextBoxColumn Class

DataGridTextBoxClass

DataGridBoolColumnClass

Page 20: Introduction to Microsoft Windows Forms DataGrid Control.

20

Adding TableStyle From the Adding TableStyle From the Designer Designer

Page 21: Introduction to Microsoft Windows Forms DataGrid Control.

21

Adding ColumnStyles From the Adding ColumnStyles From the Designer Designer

Page 22: Introduction to Microsoft Windows Forms DataGrid Control.

22

DataGrid Default and Custom DataGrid Default and Custom TableStyleTableStyle

Page 23: Introduction to Microsoft Windows Forms DataGrid Control.

23

DataGridBoolColumn ClassDataGridBoolColumn Class Specifies a column in which each cell contains a Specifies a column in which each cell contains a

check box for representing a Boolean valuecheck box for representing a Boolean value

Sample code:Sample code:Dim ts1 As New DataGridTableStyle()Dim ts1 As New DataGridTableStyle()

ts1.MappingName = "Items“ts1.MappingName = "Items“

ts1.AlternatingBackColor = Color.LightBluets1.AlternatingBackColor = Color.LightBlue

ts1.GridLineStyle = DataGridLineStyle.Solidts1.GridLineStyle = DataGridLineStyle.Solid

ts1.HeaderBackColor = Color.Bluets1.HeaderBackColor = Color.Blue

ts1.HeaderForeColor = Color.Whitets1.HeaderForeColor = Color.White

Dim boolCol As New DataGridBoolColumn()Dim boolCol As New DataGridBoolColumn()

boolCol.MappingName = "Available"boolCol.MappingName = "Available"

boolCol.HeaderText = "Is Item Available"boolCol.HeaderText = "Is Item Available"

boolCol.Width = 100boolCol.Width = 100

ts1.GridColumnStyles.Add(boolCol)ts1.GridColumnStyles.Add(boolCol)

Page 24: Introduction to Microsoft Windows Forms DataGrid Control.

24

DataGridTextBoxColumn ClassDataGridTextBoxColumn Class DataGridTextBoxColumn Class DataGridTextBoxColumn Class hosts hosts a TextBox a TextBox

control in a cell of a DataGridColumnStyle for editing control in a cell of a DataGridColumnStyle for editing texttext

DataGridTextBox Class DataGridTextBox Class represents represents a TextBox control a TextBox control that is hosted in a DataGridTextBoxColumnthat is hosted in a DataGridTextBoxColumn

Sample code:Sample code: Dim TextCol As New DataGridTextBoxColumn()Dim TextCol As New DataGridTextBoxColumn()

‘ ‘Set the MappingName to the DataColumn NameSet the MappingName to the DataColumn Name

TextCol.MappingName = "ItemDate"TextCol.MappingName = "ItemDate"

TextCol.HeaderText = "Item Date"TextCol.HeaderText = "Item Date"

TextCol.Format = "dd/mm"TextCol.Format = "dd/mm"

TextCol.Width = 100TextCol.Width = 100

‘ ‘Add the TextBoxColumn to ColumnStyles collectionAdd the TextBoxColumn to ColumnStyles collection

ts1.GridColumnStyles.Add(TextCol)ts1.GridColumnStyles.Add(TextCol)

'Add the DataGridTableStyle objects to the collection.'Add the DataGridTableStyle objects to the collection.

MyDataGrid.TableStyles.Add(ts1)MyDataGrid.TableStyles.Add(ts1)

Page 25: Introduction to Microsoft Windows Forms DataGrid Control.

25

Capturing Clicks: HitTestInfo Capturing Clicks: HitTestInfo Class Class

Page 26: Introduction to Microsoft Windows Forms DataGrid Control.

26

Sample Code: HitTest MethodSample Code: HitTest Method

HitTestInfo class contains information about HitTestInfo class contains information about a part of the DataGrid at the specified a part of the DataGrid at the specified coordinatecoordinate

Private Sub MyDataGrid_MouseDown(ByVal sender As Object, Private Sub MyDataGrid_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyDataGrid.MouseDownHandles MyDataGrid.MouseDown

Dim myHitTest As DataGrid.HitTestInfoDim myHitTest As DataGrid.HitTestInfo

Dim Result As StringDim Result As String

' Use the HitTest method with the x and y properties.' Use the HitTest method with the x and y properties.

myHitTest = MyDataGrid.HitTest(e.X, e.Y)myHitTest = MyDataGrid.HitTest(e.X, e.Y)

MsgBox("Hit Test Column =" & myHitTest.Column )MsgBox("Hit Test Column =" & myHitTest.Column )

MsgBox("Hit Test Row =" & myHitTest.Row)MsgBox("Hit Test Row =" & myHitTest.Row)

End SubEnd Sub

Page 27: Introduction to Microsoft Windows Forms DataGrid Control.

27

Determining Current Cell Determining Current Cell Information Information

Use CurrentCell property in CurrentCellChanged Use CurrentCell property in CurrentCellChanged event to get the column and row numberevent to get the column and row number

Sample code:Sample code:

Private Sub myDataGrid_CurrentCellChanged(ByVal sender As Private Sub myDataGrid_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Object, ByVal e As System.EventArgs) Handles myDataGrid.CurrentCellChanged myDataGrid.CurrentCellChanged

MessageBox.Show("Column is " & MessageBox.Show("Column is " & myDataGrid.CurrentCell.ColumnNumber _ & ", Row is " & myDataGrid.CurrentCell.ColumnNumber _ & ", Row is " & myDataGrid.CurrentCell.RowNumber _ & ", Value is " & myDataGrid.CurrentCell.RowNumber _ & ", Value is " & myDataGrid.Item(myDataGrid.CurrentCell)) myDataGrid.Item(myDataGrid.CurrentCell))

End Sub End Sub

Page 28: Introduction to Microsoft Windows Forms DataGrid Control.

28

Adding Controls to DataGridAdding Controls to DataGrid

Page 29: Introduction to Microsoft Windows Forms DataGrid Control.

29

Sample Code: Adding Controls to Sample Code: Adding Controls to DataGridDataGridPublic MyCombo As New ComboBox()Public MyCombo As New ComboBox()

Form_loadForm_loadAddHandler MyCombo.TextChanged, AddressOf Ctrls_TextChangedAddHandler MyCombo.TextChanged, AddressOf Ctrls_TextChangedMyCombo.Name = "MyCombo"MyCombo.Name = "MyCombo"MyCombo.Visible = FalseMyCombo.Visible = FalseDataGrid1.PreferredRowHeight = MyCombo.HeightDataGrid1.PreferredRowHeight = MyCombo.HeightDataGrid1.Controls.Add(MyCombo)DataGrid1.Controls.Add(MyCombo)

DataGrid1_Paint EventDataGrid1_Paint EventIf DataGrid1.CurrentCell.ColumnNumber = 3 Or If DataGrid1.CurrentCell.ColumnNumber = 3 Or

DataGrid1.CurrentCell.ColumnNumber = 4 ThenDataGrid1.CurrentCell.ColumnNumber = 4 Then MyCombo.Width = DataGrid1.GetCurrentCellBounds.WidthMyCombo.Width = DataGrid1.GetCurrentCellBounds.WidthEnd IfEnd If

Sub Ctrls_TextChangedSub Ctrls_TextChangedIf DataGrid1.CurrentCell.ColumnNumber = 3 Or If DataGrid1.CurrentCell.ColumnNumber = 3 Or

DataGrid1.CurrentCell.ColumnNumber = 4 ThenDataGrid1.CurrentCell.ColumnNumber = 4 Then DataGrid1.Item(DataGrid1.CurrentCell) = MyCombo.TextDataGrid1.Item(DataGrid1.CurrentCell) = MyCombo.TextEnd IfEnd If

Page 30: Introduction to Microsoft Windows Forms DataGrid Control.

30

Sample Code: Adding Controls to DataGridSample Code: Adding Controls to DataGrid (2) (2)

Private Sub DataGrid1_CurrentCellChangedPrivate Sub DataGrid1_CurrentCellChanged

'Combo Control Access'Combo Control AccessIf DataGrid1.CurrentCell.ColumnNumber = 3 ThenIf DataGrid1.CurrentCell.ColumnNumber = 3 Then MyCombo.Visible = FalseMyCombo.Visible = False MyCombo.Width = 0MyCombo.Width = 0 MyCombo.Left = DataGrid1.GetCurrentCellBounds.LeftMyCombo.Left = DataGrid1.GetCurrentCellBounds.Left MyCombo.Top = DataGrid1.GetCurrentCellBounds.TopMyCombo.Top = DataGrid1.GetCurrentCellBounds.Top MyCombo.Text = DataGrid1.Item(DataGrid1.CurrentCell) & ""MyCombo.Text = DataGrid1.Item(DataGrid1.CurrentCell) & "" MyCombo.Items.Clear()MyCombo.Items.Clear() MyCombo.Items.Add("Sales Representative")MyCombo.Items.Add("Sales Representative") MyCombo.Items.Add("Inside Sales Coordinator")MyCombo.Items.Add("Inside Sales Coordinator") MyCombo.Items.Add("Vice President, Sales")MyCombo.Items.Add("Vice President, Sales") MyCombo.Items.Add("Sales Manager")MyCombo.Items.Add("Sales Manager") MyCombo.Visible = TrueMyCombo.Visible = TrueElseElse MyCombo.Visible = FalseMyCombo.Visible = False MyCombo.Width = 0MyCombo.Width = 0End IfEnd If

Page 31: Introduction to Microsoft Windows Forms DataGrid Control.

31

Frequently Asked DataGrid Frequently Asked DataGrid QuestionsQuestions How to implement a ComboBox inside DataGridHow to implement a ComboBox inside DataGrid How to hide a column in DataGridHow to hide a column in DataGrid How to customize the DataGrid viewHow to customize the DataGrid view How to do paging in DataGridHow to do paging in DataGrid How to prevent a new row in DataGridHow to prevent a new row in DataGrid How to select and whole row when clicked on a cellHow to select and whole row when clicked on a cell How to color individual cells based on their valuesHow to color individual cells based on their values How to restrict keystrokes in a columnHow to restrict keystrokes in a column How to programmatically determine the selected How to programmatically determine the selected

rowsrows How to bind an array to DataGridHow to bind an array to DataGrid

Page 32: Introduction to Microsoft Windows Forms DataGrid Control.

32

Additional ReferencesAdditional References Knowledge Base articlesKnowledge Base articles

Q308052, “Q308052, “HOW TO: Display Parent/Child Records in DataGrid Using VB .NETHOW TO: Display Parent/Child Records in DataGrid Using VB .NET””

Q305271, “Q305271, “HOW TO: Perform Paging with DataGrid Control by Using VB .NETHOW TO: Perform Paging with DataGrid Control by Using VB .NET””

Q320566, “Q320566, “HOW TO: Enable DataTable Editing by Using DataGrid in VB .NETHOW TO: Enable DataTable Editing by Using DataGrid in VB .NET””

Q319082, “HOWTO: Extend Windows Form DataGridTextBoxColumn to Q319082, “HOWTO: Extend Windows Form DataGridTextBoxColumn to Display Data”Display Data”

Q318604, “HOW TO: Populate Datagrid on Bkgd Thread w/Data Binding Q318604, “HOW TO: Populate Datagrid on Bkgd Thread w/Data Binding (VB)”(VB)”

Q318581, “HOW TO: Extend the Windows Form DataGridTextBoxColumn to Q318581, “HOW TO: Extend the Windows Form DataGridTextBoxColumn to custom format data”custom format data”

Q317951, “HOW TO: Hide a Column in a Windows Form DataGrid”Q317951, “HOW TO: Hide a Column in a Windows Form DataGrid” Q317041, “HOW TO: Retrieve DataView of Bound Control in Visual Q317041, “HOW TO: Retrieve DataView of Bound Control in Visual

Basic .NET”Basic .NET” Q313482, “INFO: Roadmap for Windows Forms Data Binding”Q313482, “INFO: Roadmap for Windows Forms Data Binding” Q308070, “HOW TO: Implement a Searchable DataGrid by Using ADO.NET”Q308070, “HOW TO: Implement a Searchable DataGrid by Using ADO.NET” Q323167, “HOW TO: Add ComboBox Control to Windows Form DataGrid Q323167, “HOW TO: Add ComboBox Control to Windows Form DataGrid

Control”Control” External linksExternal links

http://www.syncfusion.com/FAQ/WinForms/default.asphttp://www.syncfusion.com/FAQ/WinForms/default.asp http://www.datagridcolumnstyles.net/http://www.datagridcolumnstyles.net/