Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
How to make entire grid read-only
posted

Hey,

I've only just started using XamDataGrid and am not very familiar with it yet.

All I need to make this entire grid read-only as all the user needs to do is select a record to be edited, deleted, etc; since what is displayed is only a small sample of the entire record.  However, since the Orientation is Horizontal; this swaps things around so my rows become columns and my columns become columns.  Is there a simple property to set the entire grid to read-only in the Xaml or do I have to set each column as read-only.  If each column, how do I do that; since they are auto-generated based on the contents of the DataSource.

Thanks in advance.

<igWPF:XamDataGrid Grid.Column="0" Grid.Row="23" Grid.ColumnSpan="5" Name="bhaGrid" VerticalAlignment="Top"
DataSource="{Binding BhaViews}" ActiveDataItem="{Binding CurrentBha}">
     <igWPF:XamDataGrid.ViewSettings>
         <igWPF:GridViewSettings Orientation="Horizontal"/>
     </igWPF:XamDataGrid.ViewSettings>
</igWPF:XamDataGrid>

  • 2680
    Offline posted

    Hi Phillip,

    Thank you for posting to Infragistics Community!

    Editing could be disallowed regardless of the orientation by setting the FieldSettings AllowEdit property to “False”:  

    <igWPF:XamDataGrid.FieldSettings>
        <igWPF:FieldSettings AllowEdit="False" />
    </igWPF:XamDataGrid.FieldSettings>

    More information could be found in the Configuring Editing Behavior (xamDataGrid) topic in our documentation.

    If you require any further assistance on the matter, please, let me know.

    Best regards,
    Bozhidara Pachilova
    Software Developer