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 :o)
-----Original Message-----
Hi Tonya,
You should set datasource's IBindingList.AllowNew to
false.
--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rhand.com
"Tonya" <gs@df> wrote in message
news:04****************************@phx.gbl... Hi,
I wanted to know how i could get rid of the final row
that appears in a datagrid (The one where a new row can be
entered).
can anyone point me in the right direction??
thx in advance
.