Hello
I have a problem using datagrids, datasets and dataviews. I fill up a dataset from a table, use it to fill a dataview and the dataview shows in the datagrid. So far so good.
Now I'm having some issues while trying to update and insert records. I have to check certain columns because they are required fields + they can't contain identical values. This is where the problems start.
When entering values in the datagrid, I can't seem to check the values (if I enter nothing, the datagrid.item(i,j) property just shows the previous value of the field when checking) before writing them in the dataset, so I always have to restore those manually, no probs when you don't use sorting on the grid, but problems start entering when you sort the records or hide values with certain values (checkbox checked/unchecked).
Some code :
myDataset = Object.fillDS("stored_procedure", name_table)
myDataview = New DataView(myDataset.Tables(0), "checkbox1 = 1", "value to sort on", DataViewRowState.CurrentRows)
myDatagrid.DataSource = myDataview
Is there another way to hide/show records then using the dataviews?
I have a problem using datagrids, datasets and dataviews. I fill up a dataset from a table, use it to fill a dataview and the dataview shows in the datagrid. So far so good.
Now I'm having some issues while trying to update and insert records. I have to check certain columns because they are required fields + they can't contain identical values. This is where the problems start.
When entering values in the datagrid, I can't seem to check the values (if I enter nothing, the datagrid.item(i,j) property just shows the previous value of the field when checking) before writing them in the dataset, so I always have to restore those manually, no probs when you don't use sorting on the grid, but problems start entering when you sort the records or hide values with certain values (checkbox checked/unchecked).
Some code :
myDataset = Object.fillDS("stored_procedure", name_table)
myDataview = New DataView(myDataset.Tables(0), "checkbox1 = 1", "value to sort on", DataViewRowState.CurrentRows)
myDatagrid.DataSource = myDataview
Is there another way to hide/show records then using the dataviews?