Single row disable

 Goodmorning,

I have below sfDataGrid into View:                       

<dataGrid:SfDataGrid x:Name="dataGrid"
   ItemsSource="{Binding Tasks}"

in the ViewModel i have:

[Reactive] public ObservableCollection<TaskViewModel> Tasks { get; set; }

and

public class TaskViewModel : ReactiveObject

{

   [Reactive] public bool IsExternal { get; set; }

   .....

}

I would like to disable only the rows that have property IsExtern set to true. Is possible?

Thanks.

Roberto


3 Replies

MR Muthupandy Ramakrishnan Syncfusion Team April 10, 2026 01:07 PM UTC

Hi Roberto Becchetti,

Thank you for reaching out to us. Currently, SfDataGrid does not provide built‑in support to disable individual rows.
As a workaround, we have prepared a sample that restricts row selection and cell editing in the DataGrid based on a boolean property (IsExternal = true) using the available DataGrid events. This approach helps prevent user interaction for the required rows.
Please refer to the attached sample and video for more details. Let us know if you need any further assistance.

Best Regards,
Muthupandy R.


Attachment: SfDataGridSample_7129136e.zip


RB Roberto Becchetti April 16, 2026 08:48 PM UTC

Thanks for example.

but i find on syncfusion documentation the section "Conditional Styling"->"Style a particular row based on RowData" that explain what I wanted to do in the easyliest way.

Bye.



MR Muthupandy Ramakrishnan Syncfusion Team April 17, 2026 09:59 AM UTC

Hi Roberto Becchetti,
We’re happy to hear that you were able to achieve your requirement using Conditional Styling. Yes, you can absolutely use conditional styling to apply styles based on the row data—for example, to change the appearance (such as colors) and visually indicate that a row is disabled.
In our earlier response, we assumed that the requirement was to completely prevent all interactions with specific rows (such as selection, editing, etc.). That’s why we suggested the event‑based workaround at that time.
Thank you for sharing your findings. We’re glad to know that you were able to achieve the desired behavior.
Please let us know if you need any further assistance—we’re happy to help.


Best Regards,
Muthupandy R.


Loader.
Up arrow icon