hi sir i have created datagridview in vb.net programmetically.i have 10 databound columns. All columns are shrinken.i want create a scrollable datagridview.How to do it?pls help me..
'Set AutoGenerateColumns False
formPurchaseReceive.purchasereceiveDGV.AutoGenerateColumns = False
'Set Columns Count
formPurchaseReceive.purchasereceiveDGV.ColumnCount = 8
'Add Columns
formPurchaseReceive.purchasereceiveDGV.Columns(0).Name = "Product_ID_Barcode"
formPurchaseReceive.purchasereceiveDGV.Columns(0).HeaderText = "Product ID"
formPurchaseReceive.purchasereceiveDGV.Columns(0).DataPropertyName = "Product_ID_Barcode"
formPurchaseReceive.purchasereceiveDGV.Columns(0).ReadOnly = True
formPurchaseReceive.purchasereceiveDGV.Columns(1).Name = "Product_Name"
formPurchaseReceive.purchasereceiveDGV.Columns(1).HeaderText = "Product Name"
formPurchaseReceive.purchasereceiveDGV.Columns(1).DataPropertyName = "Product_Name"
formPurchaseReceive.purchasereceiveDGV.Columns(1).ReadOnly = True
formPurchaseReceive.purchasereceiveDGV.Columns(2).Name = "Ordered_Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(2).HeaderText = "Ordered Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(2).DataPropertyName = "Order_Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(2).ReadOnly = True
formPurchaseReceive.purchasereceiveDGV.Columns(3).Name = "Received_Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(3).HeaderText = "Received Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(3).DataPropertyName = "Received_Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(3).ReadOnly = False
formPurchaseReceive.purchasereceiveDGV.Columns(4).Name = "PreviousBalance"
formPurchaseReceive.purchasereceiveDGV.Columns(4).HeaderText = "PreviousBalance"
formPurchaseReceive.purchasereceiveDGV.Columns(4).DataPropertyName = "Balance_Quantity1"
formPurchaseReceive.purchasereceiveDGV.Columns(4).ReadOnly = True
Dim returnstatus As New DataGridViewComboBoxColumn
returnstatus.Name = "ReturnStatus"
returnstatus.Items.Add("Yes")
returnstatus.Items.Add("No")
formPurchaseReceive.purchasereceiveDGV.Columns.Insert(5, returnstatus)
formPurchaseReceive.purchasereceiveDGV.Columns(6).Name = "DefectiveQuantity"
formPurchaseReceive.purchasereceiveDGV.Columns(6).HeaderText = "DefectiveQuantity"
formPurchaseReceive.purchasereceiveDGV.Columns(6).ReadOnly = True
formPurchaseReceive.purchasereceiveDGV.Columns(7).Name = "Balance_Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(7).HeaderText = "Balance Quantity"
formPurchaseReceive.purchasereceiveDGV.Columns(7).ReadOnly = True
Dim expirationdate As New CalendarColumn
expirationdate.Name = "expiredDate"
expirationdate.HeaderText = "Expiration Date"
formPurchaseReceive.purchasereceiveDGV.Columns.Insert(8, expirationdate)
formPurchaseReceive.purchasereceiveDGV.Columns.RemoveAt(9)
Dim multipleexpiryDate As New DataGridViewComboBoxColumn
multipleexpiryDate.Name = "multipleExpiryDate"
multipleexpiryDate.Items.Add("Yes")
multipleexpiryDate.Items.Add("No")
formPurchaseReceive.purchasereceiveDGV.Columns.Insert(9, multipleexpiryDate)