Change click order in treestate checkbox column

Hello,

I have an SfDataGrid with 

  this.PrimaryGrid.Columns.Add(new GridCheckBoxColumn()

            {

                MappingName = "Engedelyezve",

                AllowThreeState = true,

            });

When I run the application the click order in the checkbox is

Indeterminate -> False -> True

but I would like use this order:

Indeterminate -> True -> False

Can you help me please that this is possible to change the order?


My other question: can I create a custom Tree-State ToggleButton Column into the SfDataGrid?

For example similar like this:


Thank you for help!

BR, SZL



4 Replies

DM Dhanasekar Mohanraj Syncfusion Team September 19, 2022 03:01 PM UTC

Hi SZL,


Please find the response for your requirement below,

Requirement

Response


When I run the application the click order in the checkbox is

Indeterminate -> False -> True

but I would like use this order:

Indeterminate -> True -> False

Can you help me please that this is possible to change the order?

 

 

Currently, we are checking the feasibility to achieve your requirement. We will check and update you with further details on September 21, 2022.

We appreciate your patience until then.


My other question: can I create a custom Tree-State ToggleButton Column into the SfDataGrid?

For example similar like this:



 

Our SfDataGrid, allows you to create the custom column based on your requirement and the renderer for it. Please refer to the below user guide documentation for implementing a custom column to the datagrid,

 

UG Link: https://help.syncfusion.com/windowsforms/datagrid/columntypes#creating-new-column-and-renderer

Here, we have attached the reference demo to create the custom column. Please have a look at this and revert us if you have any concerns about this


Regards,

Dhanasekar M.


Attachment: howtocreatecustomcolumninwinformsdatagrid_32efc918.zip


DM Dhanasekar Mohanraj Syncfusion Team September 21, 2022 02:08 PM UTC

Hi SZL,

We have checked feasibility to achieve your requirement “To change the check states flow Indeterminate -> True -> False”. We regret to let you know that there are no possibilities to modify the GridCheckBoxColumns checked state flow as you requested. Please revert us if you have any concerns on this.

Regards,
Dhanasekar M.



SZ SZL replied to Dhanasekar Mohanraj September 21, 2022 06:53 PM UTC

Hi,

Thank you, in this case I will try the custom column.

One question: (if I good see) all of your examples shows a read-only column, do you have any example how can I create an editable custom column, that accept data bindings of the grid. For example can accept and manage true/false/null change.

Thank you very much!




DM Dhanasekar Mohanraj Syncfusion Team September 22, 2022 03:42 PM UTC

Hi SZL,

 By default, the custom column is used when we need to perform some custom operations or modify the default flow of the default columns as required. We shared the demos for doing so in the previous update, and we've already published the KB for the editable custom column shown below.

KB link: 
https://www.syncfusion.com/kb/12633/how-to-create-dropdown-datagrid-column-in-winforms-datagrid-sfdatagrid 

Please refer to this for more information. You can handle the state of checkboxes by using MouseUp and KeyDown events in the renderer as required. 

Regards,
Dhanasekar M


Loader.
Up arrow icon