Articles in this section
Category / Section

How to create ReadOnly UnboundRows?

1 min read

The SfDataGrid allows you to create the ReadOnly UnBoundRows in two ways:

  1. You can create the Readonly unboundRows by setting the Position and ShowBelowSummary properties of the GridUnBoundRow based on the following table summary.

Position

ShowBelowSummary

Is Unbound Row Editable

Top

False

Not Editable

Top

True

Editable

Bottom

True

Not Editable

Bottom

False

Editable

 

XAML

<Syncfusion:SfDataGrid>
    <Syncfusion:SfDataGrid.UnBoundRows>
        <Syncfusion:GridUnBoundRow Position="Top" ShowBelowSummary="False"/>
        <Syncfusion:GridUnBoundRow Position="Bottom" ShowBelowSummary="True"/>
    </Syncfusion:SfDataGrid.UnBoundRows>
</Syncfusion:SfDataGrid>

 

  1. You can cancel the editing of the unbondrows by handling the CurrentCellBeginEdit event.
    using Syncfusion.UI.Xaml.Grid;
    SfdataGrid.CurrentCellBeginEdit += SfdataGrid_CurrentCellBeginEdit;
    void SfdataGrid_CurrentCellBeginEdit(object sender, CurrentCellBeginEditEventArgs args)
    {
        if (SfdataGrid.IsUnBoundRow(args.RowColumnIndex.RowIndex))
        {
            args.Cancel = true;
        }
    }
    

 

Sample Links:

WPF

WinRT

UWP

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied