If you have added a table style to your DataGrid (so individual column styles have been generated), then you can use code such as this to set the Format property of a particular column style.
[C#]
//add format col 3 columnstyle where column 3 holds a date...
DataGridTextBoxColumn...
Create DataView from DataSet, filter DataView with RowFilter property & assign to DataGrid as –
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles MyBase.Load
Ds1.Clear()
DAMast.Fill(Ds1, "Master")
ComboBox1.DataSource =...
1. You cannot hide a row in VS2003.
2. You can do this by derivation from DataGridTextBoxColumn and by overriding the Paint method to conditionally set the backColor and foreColor. Sample code is –
Public Class DataGridColoredTextBoxColumn
Inherits DataGridTextBoxColumn
Public Sub New()
End...
You can execute the SqlCommand to insert/update/delete records like this -
Dim myCommand As New SqlClient.SqlCommand
Dim myTrans As SqlClient.SqlTransaction
myTrans = SqlConnection1.BeginTransaction()
myCommand.Connection = SqlConnection1
myCommand.Transaction = myTrans
Try
str = "<QUERY>"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.