You have many topics in this forums about inserting row with LinqToSQL. I fallowed all your instructions, I’m using VB and her’s the code:
Private db As New LinqSQLDataContext
Private Sub Page1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
Dim b As New Binding
Dim c As New DataGridCollectionView(db.Table1.GetNewBindingList)
b.Source = c
I can insert a row and the PK_Id show automaticly 0. But it stop there, I can not edit the others fields of the inserted row. All the others rows works fine, I can edit and SubmitChange, sort and filter, but not insert a row. Can you help me !
Imported from legacy forums. Posted by Etienne (had 909 views)
Yes, AutoCreatColumns = False, if I set it to True, it works fine. I will take a look at the Column.CellEditor. Can I hide and rename columns in AutoCreatColumns = True mode direcly in my VB code when Page1.Loaded ?
Imported from legacy forums. Posted by Etienne (had 518 views)
Yes, you can hide columns by setting their Visible property even if AutoCreateColumns is set to true; however, what I suggest you do if you don’t need to extra columns is to explicit define only the DataGridItemProperty objects you want in your DataGridCollectionView. The defined item properties correspond to the columns that will be in your grid.
Imported from legacy forums. Posted by Jenny [Xceed] (had 458 views)