none
Datagrid editable

    Question

  • I can make my datagrid editable by setting IsReadOnly to False....

    But in my dataform I alos have AutoGenerateColumns set to false and specify specific fields I want to see....OUT of these fields I am specifying I only want to make 1 or 2 editable.

    How do I control and set specific fields in my datagrid to be editable?

    THanks

     <data:DataGrid Name="dataGrid_Inspectors" MinHeight="100" IsReadOnly="True" Width="Auto" Height="600"        
         Margin="20,0,20,0"  ItemsSource="{Binding Data, ElementName=BusinessDataSource_Inspectors, Mode=TwoWay}"
         SelectionMode="Single" Visibility="Collapsed" AutoGenerateColumns="False"
         MouseRightButtonDown="dataGrid_Inspectors_MouseRightButtonDown">
       <sdk:DataGrid.Columns>
          <sdk:DataGridTextColumn
             Header="FireDistrict" Width="Auto" Binding="{Binding FireDistrict}" />
          <sdk:DataGridTextColumn
             Header="BusinessName" Width="Auto" Binding="{Binding BusinessName}" />
       </sdk:DataGrid.Columns>
     </data:DataGrid>

    Friday, March 02, 2012 10:01 AM

Answers

All replies

  • Have you tried with the IsReadOnly property of DataGridTextColumn?

    Friday, March 02, 2012 11:37 AM
  • Thanks that was it....I tried that before and was getting an error...maybe I spelled it wrong or something...VS was not showing that as an option as well when typing it in....it wasnt prompting me of that being an option..

    But working now...thanks

    Friday, March 02, 2012 11:52 AM