Recent content by mudmike

  1. M

    Format DataGrid at design time

    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...
  2. M

    Problem With DataGrid (Select)

    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 =...
  3. M

    Altering Attributes in DataGrid

    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...
  4. M

    how to update data from datagrid and store back in datasorce

    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>"...
Top Bottom