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.
Unfortunately, activation email could not send to your email. Please try again.

Event for checkbox

Thread ID:

Created:

Updated:

Platform:

Replies:

132561 Sep 8,2017 09:20 AM Apr 30,2018 07:02 AM Xamarin.Forms 7
loading
Tags: SfDataGrid
DukeMeister
Asked On September 8, 2017 09:20 AM

I have an sfdatagrid with auto generated columns. One of these is a boolean/checkbox. I want to respond to a checkbox being checked so that I can refresh the grid (so it re-sorts itself). How can I do this?

Ashok N [Syncfusion]
Replied On September 11, 2017 06:20 AM

Hi Tino,   
  
We cannot able to listen the Tap action on the Switch while change the value, already we will consider this as feature enhancement of GridSwitchColumn and this GridSwitchColumn events support will be available in our upcoming 2017 Vol 3 SP2 release, which will be schedule for rolls out end of September. We appreciate your patience until then.  
 
Regards,   
Ashok  


DukeMeister
Replied On September 11, 2017 10:41 AM

Thanks. I'm also curious why the GridSwitchColumn shows as a checkbox and not as a switch (in Android).


Ashok N [Syncfusion]
Replied On September 12, 2017 02:09 PM

Hi Tino, 
 
Thanks for your update.  
 
In Xamarin.Forms.Android we have loaded the Switch as CheckBox because of the customer requirement. Many of the customers requested CheckBox only instead of loading switch. We can able to customize this by overriding GridColumn column and that as GridColumn CellType. 
 
Regards, 
Ashok  


Dirk Wessels
Replied On October 11, 2017 01:15 AM

Hi Tino,   
  
We cannot able to listen the Tap action on the Switch while change the value, already we will consider this as feature enhancement of GridSwitchColumn and this GridSwitchColumn events support will be available in our upcoming 2017 Vol 3 SP2 release, which will be schedule for rolls out end of September. We appreciate your patience until then.  
 
Regards,   
Ashok  


Hi,

Can you tell me when this will be available please. You mention end of September, but as far as I can see the latest release was on 7 August.

https://www.syncfusion.com/downloads/latest-version

I really need this functionality.


Ashok N [Syncfusion]
Replied On October 12, 2017 12:58 AM

Hi Dirk,    
 
We are sorry about the inconvenience caused. 
    
We have checked the editing event support for GridSwitchColumn in our SfDataGrid Control and normally SwitchColumn didn’t have editing events support, this is DataGrid behavior so we cannot able to provide the edit event support (like CurrentCellBeginEdit and CurrentCellEndEdit) for GridSwitchColumn. Instead of this we will provide the ValueChanged event support. Within this event args we will provide the Original Sender, Column, RowColumnIndex and Record. If you require any other event args , please share the details, We will progress this work once you provide the requirement details. Hence, we did not include this support in our 2017 Vol 3 SP2 release.  
 
Regards,    
Ashok   


Hermann Swart
Replied On April 27, 2018 02:11 AM

Hi,
is there an update on when this will be realized?

We also need this event.

Suriya Kalidoss [Syncfusion]
Replied On April 30, 2018 07:02 AM

Hi Hermann, 
Thank You for using Syncfusion Products, 
  We had analyzed your requirement. To get Switch toggle event use the custom renderer class. Refer the below code snippet for how to write custom renderer class for switch column. 
Code logics: 
  sfGrid.CellRenderers.Remove("Switch"); 
  sfGrid.CellRenderers.Add("Switch", new Gridswitchcontrol()); 
 
//Custom Renderer Class 
 
  public class Gridswitchcontrol:GridCellSwitchRenderer 
        { 
          public  Gridswitchcontrol() 
            { 
 
            } 
          
            public override void OnInitializeDisplayView(DataColumnBase dataColumn, SfSwitchControl view) 
            { 
                base.OnInitializeDisplayView(dataColumn, view); 
   
                view.Toggled += View_Toggled; 
            } 
 
            private void View_Toggled(object sender, ToggledEventArgs e) 
            { 
               //Your Requirement here 
            } 
        } 
 
We had attached sample for your reference, you can download it from the below link. 
Regards, 
Suriya K 


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.

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.

;