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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to get the event cheked in Syncfusion : GridCheckBoxColumn ?

Thread ID:

Created:

Updated:

Platform:

Replies:

120904 Oct 26,2015 08:51 PM UTC Mar 28,2019 12:30 PM UTC WPF 5
loading
Tags: SfDataGrid
Luis Fernando
Asked On October 26, 2015 08:51 PM UTC

 <syncfusion:GridCheckBoxColumn TextAlignment="Center" x:Name="chkImpuesto" AllowEditing="True" HeaderText="{DynamicResource Texto_Impuestos}" MappingName="Impuestos" Changed="chkImpuesto_Changed" />

                             

Jai Ganesh S [Syncfusion]
Replied On October 27, 2015 09:12 AM UTC

Hi Luis,

Thank you for using Syncfusion Products.

We analyzed your query. Due to GridCheckBoxColumn behavior it does not fire any Editing events. Instead of editing events you can use CurrentCellvalueChanged event to get fired when the check box value is changed.
Code Example [C#]:

private void grid_CurrentCellValueChanged(object sender, CurrentCellValueChangedEventArgs args)

     {

            SfDataGrid grid = sender as SfDataGrid;

            int columnindex = grid.ResolveToGridVisibleColumnIndex(args.RowColumnIndex.ColumnIndex);

            var column = grid.Columns[columnindex];

            if (column.GetType() == typeof(GridCheckBoxColumn))

            {

                MessageBox.Show("Checkbox value changed ");

            }
     }



We have also prepared a sample based on this and you can download the sample from the below location,

Sample: http://www.syncfusion.com/downloads/support/directtrac/145903/ze/DataGrid-1284954582

Please let us know if you have any query.

Regards,
Jai Ganesh S


Luis Fernando
Replied On October 27, 2015 06:10 PM UTC

Hi Luis,

Thank you for using Syncfusion Products.

We analyzed your query. Due to GridCheckBoxColumn behavior it does not fire any Editing events. Instead of editing events you can use CurrentCellvalueChanged event to get fired when the check box value is changed.
Code Example [C#]:

private void grid_CurrentCellValueChanged(object sender, CurrentCellValueChangedEventArgs args)

     {

            SfDataGrid grid = sender as SfDataGrid;

            int columnindex = grid.ResolveToGridVisibleColumnIndex(args.RowColumnIndex.ColumnIndex);

            var column = grid.Columns[columnindex];

            if (column.GetType() == typeof(GridCheckBoxColumn))

            {

                MessageBox.Show("Checkbox value changed ");

            }
     }



We have also prepared a sample based on this and you can download the sample from the below location,

Sample: http://www.syncfusion.com/downloads/support/directtrac/145903/ze/DataGrid-1284954582

Please let us know if you have any query.

Regards,
Jai Ganesh S


Now as I get the value of GridCheckBoxColumn?

Jai Ganesh S [Syncfusion]
Replied On October 28, 2015 09:03 AM UTC

Hi Luis,

You can get the CheckBoxColumn value in CurrentCellValueChanged event by using the Rowindex like the below code example,
Code Example [C#]:

private void grid_CurrentCellValueChanged(object sender, CurrentCellValueChangedEventArgs args)

        {

            SfDataGrid grid = sender as SfDataGrid;

            int columnindex = grid.ResolveToGridVisibleColumnIndex(args.RowColumnIndex.ColumnIndex);

            var column = grid.Columns[columnindex];

            if (column.GetType() == typeof(GridCheckBoxColumn))

            {

                var rowIndex = this.grid.ResolveToRecordIndex(args.RowColumnIndex.RowIndex);

                var record = this.grid.View.Records[rowIndex].Data as Student;

                var value = record.IsCheck;

            }
        }   



We have also modified the  sample based on this and you can download the sample from the below location,

Sample: http://www.syncfusion.com/downloads/support/directtrac/146186/ze/DataGrid518228312

Regards,
Jai Ganesh S

Guadalupe
Replied On March 27, 2019 06:30 PM UTC

Hello
I've problem with CurrentCellValueChangedEventArgs


Deivaselvan Y [Syncfusion]
Replied On March 28, 2019 12:30 PM UTC

Hi Guadalupe,

Thank you for contacting Syncfusion support.

We are unable to get clear details on your issue with the given details. Kindly update us with more clear details on your issue description and its replication procedure to understand the issue at our end. Thereby we could analyze and provide you with the appropriate solution at the earliest.

Regards,
Deivaselvan 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;