Hi Miha,
Where do i wright this code?
my datasourse is a dataset that i created.
do i just do
dataset.ibindinglist.allownew=false
??
here ismt datagrid tht is being created....
da = New SqlDataAdapter("SELECT Meal_Type, 0 as Quantity
FROM Menu", Cn)
ds = New DataSet("MealBooking")
da.Fill(ds, "MealBooking")
DGridMealBooking.DataSource = ds.Tables(0)
Dim TSMealBooking As New DataGridTableStyle()
TSMealBooking.MappingName = "MealBooking"
Dim TCMealName As New DataGridTextBoxColumn()
TCMealName.MappingName = "Meal_Type"
TCMealName.HeaderText = "Meal Name"
TCMealName.Width = 150
TCMealName.ReadOnly = True
TSMealBooking.GridColumnStyles.Add(TCMealName)
Dim TCMealQuantity As New DataGridTextBoxColumn()
TCMealQuantity.MappingName = "Quantity"
TCMealQuantity.HeaderText = "Quantity"
TCMealQuantity.Width = 100
TCMealQuantity.ReadOnly = False
TSMealBooking.GridColumnStyles.Add(TCMealQuantity)
DGridMealBooking.TableStyles.Add(TSMealBooking)
thx for your help
)