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
140
Adding a new row with different editable fields
posted

Hello,

My issue lies with adding a new row with editing.  I have no problems with the actual adding of the new row.  I have my datagrid with eight columns, three of which are editable.  However, I want the user to be able to add a new row, with all eight columns being editable for just that row.  Is this possible?

Thanks for the help!

Parents
No Data
Reply
  • 21382
    Suggested Answer
    posted

    You could do it with the CellEditingEvents, checking to see if the cell is in a column you want to exclude and cancelling entering edit mode in that case

     

     

     private void xamGrid_CellEnteringEditMode(object sender, BeginEditingCellEventArgs e)

            {

                if (e.Cell.Column.Key == "Title")

                {

                    if (!(e.Cell.Row is AddNewRow))

                    {

                        e.Cancel = true;

                    }

                }

     

            }

     

Children
No Data