We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Microsoft Datagridview and Syncfusion Splitbutton behaviour

on a winform I have placed a Ms Datagridview with checkboxes and one Ms button.
If I check on a row of datagridview and then I click the Ms button the following code works correctly

  Protected Function GetGrdFattureSelectedIds() As List(Of Integer)
        'Get the list of selected id
        Dim L As New List(Of Integer)
        For Each Row As DataGridViewRow In grdFatture.Rows
            If Row.Cells("Selezionato").Value = True Then L.Add(Row.Cells("idDocumento").Value)
        Return L
    End Function

I have placed a Syncfusion splitbutton and that routine fails the value of the last checked row: If I check only one row returns no items if I check three rows it returns the first two rows only. It seems that splitbutton doesn' t allow the datagridrow to complete events chain.
Any idea? thanks

3 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team August 7, 2019 01:51 PM UTC

Hi Sauro, 
Thank you for contacting Syncfusion support. 
Based on the provided information, currently we are analyzing the issue. We will validate and let you know the details in two business days (August 9, 2019). We appreciate your patience until then. 
Subburaj Pandian V


SP Subburaj Pandian Veluchamy Syncfusion Team August 9, 2019 12:07 PM UTC

Hi Sauro 
Thank you for your patience. 
We have analyzed your reported behavior “MS DataGridView cell value is not updated properly when looped using SplitButton click” and we have confirmed it is a defect. We have logged a report for the same and the patch for this fix is estimated to be available on or before August 28, 2019. We appreciate your patience until then. 
You can tract the status of this report using the following feedback link: 
Note: The provided feedback link is private, and you need to login to view this feedback. 
Subburaj Pandian V  

JP Jagadeesan Pichaimuthu Syncfusion Team August 28, 2019 07:30 AM UTC

Hi Sauro, 
Thanks for your patience. 
We have checked the reported case related with “MS DataGridView cell value is not updated properly when looped using SplitButton click” and it has been found that it is behavior of custom controls which is derived from Control. Our SplitButton control is derived from the Control, its Click action would perform directly using the Window process message, so the changed cell of DataGridView is in dirty state and the focus is in current cell and not anywhere. Hence the cell value does not get changed and updated. Whereas the Button is derived from the ButtonBase control, whose click action would be invoked at the MouseDown event and then it has been processed by the Window process message. So the focus would lost and the cell value get correctly committed. We have also checked the behavior with the custom control and it also behaves the same and it has been given in the below sample. 
So we have worked further on this and prepared the workaround to get the committed the cell value which is in dirty state using the CurrentCellDirtyStateChanged event of MSDataGridView using the following code: 
Code Snippet:[C#] 
private void DataGridView1_CurrentCellDirtyStateChanged(object sender, System.EventArgs e) 
            if (dataGridView1.CurrentCell.ColumnIndex == 0 && dataGridView1.IsCurrentCellDirty) 
Please download the sample and video for your reference: 
Please try this solution and let us know if it is helpful. 

Live Chat Icon For mobile
Up arrow icon