unable to update database for GridCheckBoxColumn
Hello,
i am unable to update the database after editing a GridCheckBoxColumn.
I am able to update all the other columns (GridTextColumn and GridNumericColumn).
I am able to update all the other columns (GridTextColumn and GridNumericColumn).
I use NPGSQL to get the data from a database.
Dim connString As String
connString = "Host=192.168.1.3;Username=****;Password=****;Database=*****"
conn = New NpgsqlConnection(connString)
conn.Open()
Dim Sql = "SELECT * FROM ""anagrafica sedi legali"" ORDER BY ""nome/ragione sociale"""
data_adapter = New NpgsqlDataAdapter(Sql, conn)
dset.Reset()
data_adapter.Fill(dset)
bindsource.DataSource = dset.Tables(0)
SfDataGrid1.SelectionMode = Syncfusion.WinForms.DataGrid.Enums.GridSelectionMode.Single
SfDataGrid1.AllowSelectionOnMouseDown = True
SfDataGrid1.EditMode = Syncfusion.WinForms.DataGrid.Enums.EditMode.SingleClick
SfDataGrid1.AutoGenerateColumns = True
SfDataGrid1.AutoSizeColumnsMode = Enums.AutoSizeColumnsMode.AllCells
SfDataGrid1.DataSource = bindsource
Then I update the database by clicking a button.
Private Sub SalvaDatiToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SalvaDatiToolStripMenuItem.Click
On Error GoTo errore
conn.Open()
Dim scb = New NpgsqlCommandBuilder(data_adapter)
'data_adapter.Update(dset)
data_adapter.Update(bindsource.DataSource)
conn.Close()
MsgBox("dati correttamente salvati")
Exit Sub
errore:
conn.Close()
MsgBox("errore di salvataggio")
End Sub
This code works well with all column except the GridCheckBoxColumn
I am able to update them only if I edit other data in same row.
SIGN IN To post a reply.
5 Replies
FP
Farjana Parveen Ayubb
Syncfusion Team
April 11, 2018 12:26 PM UTC
Thanks for contacting Syncfusion support.
We have checked your reported issue in DataTable collection, but the reported issue not reproduced on our end. When the GridCheckBoxColumn value is edited at the run time, the underlying data source is updated correctly.
Please refer the below sample which we are tried to reproduce the issue,
Sample Location: http://www.syncfusion.com/downloads/support/forum/136950/ze/GridCheckBoxColumn_Sample-1333618141
If still you have faced the issue could please revert by modifying the attached sample based on your application along with the replication procedure, please share your application if it is possible. It will be helpful for us to analyze further.
Regards,
Farjana Parveen A
DG
Derek Geldart
August 3, 2018 01:51 PM UTC
When using your sample I noticed if you change a cell value say EmployeeName and then tab through the line you will get an error when tabbing over the checkboxcolumn. If you edit the employee name and then down arrow to a new row you don't get any errors. If you do not edit a cell and tab over the checkboxcolumn to a new row you do not get any errors. Something appears to be broken with the checkboxcolumn when row data has been modified.

Here is the error I get from your sample
MA
Mohanram Anbukkarasu
Syncfusion Team
August 6, 2018 12:26 PM UTC
Hi Derek,
Thanks for your update.
We were able to reproduce the reported issue and confirmed as a defect. We have logged a bug report on this regard. The fix for this issue will be available in our upcoming 2018 Volume 2 SP2 release, which is expected to be rolled out in end of August 2018.
Regards,
Mohanram A.
BÜ
Bülent
August 9, 2018 07:22 AM UTC
Hello,
It's also occured while using GridComboBoxColumn.
Thank you.
NK
Neelakandan Kannan
Syncfusion Team
August 9, 2018 09:01 AM UTC
Hi Bülent,
Thanks for your update.
We have already considered to fix this reported issue with the GridComboBoxColumn. The fix will be available on 2018 Volume 2 – SP2 release which is expected to be rolled out in end of August 2018.
Regards,
Neelakandan
SIGN IN To post a reply.
- 5 Replies
- 6 Participants
-
LU luigi
- Apr 10, 2018 03:04 PM UTC
- Aug 9, 2018 09:01 AM UTC