Home Forums WPF controls Xceed DataGrid for WPF question on insertrow

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #26968 |

    Two questions please – I’m just a newbe

    1 If I set/leave alone AutoCreateColumns to true/default, have an InsertRow defined and set the columns I want visible things work the way I expect. I can edit the existing data and insert new data into the InsertRow. If I set the AutoCreateColumns to false and create the columns in the code the insert row is displayed but I can not entered any data. I can edit existing data.

    the code looks like this that works as expeacted

    //                m_lDataGridControl.AutoCreateColumns = false;

                       M_lDataGRidControl.Columns{“Text1”].Title = “TEST”;

                        m_lDataGridControl.Columns[“Text4”].Visible = false;


                         m_lDataGridControl.Colums{“Text20”].Visible = false;

     What does not work the way I expect is

                  m_lDataGridControl.AutoCreateColumns = false;

                   Column cColumn = new Column();

                   CColumn.Fieldname = “Text1”;

                   cColumn.Title = “TEST”;


     /*                  m_lDataGRidControl.Columns{“Text1”].Title = “TEST”;

                        m_lDataGridControl.Columns[“Text4”].Visible = false;


                         m_lDataGridControl.Colums{“Text20”].Visible = false; */

     Second question is there a way that after you press the return key in the InsertRow and enter a new row that the cell in the InsertRow is in editmode instead of the user having to select the row. The idea is to create a seamless insert process where the user can enter data into a row, tab to each cell in the row enter data, press return and continue entering data on the new blank insertion row

    Imported from legacy forums. Posted by William (had 764 views)

    Xceed Support
    Post count: 5658

    When working with AutoCreateColumns = false, for the InsertionRow to
    function property, you will need to manually set CellEditors on the


    <Column CellEditor=”{x:Static xcdg:CellEditor.TextBoxEditor}” />

     As for your second question, you can find the answer in this thread.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 1975 views)

    User (Old forums)
    Post count: 23064


     I think that I also encountered this issue.

     If I don’t define the cellEditor for a dataTable bound data grid (with AutoCreateColumns false) I cannot edit the cells in a new row.

     However, if I pre-populate the values of the new row during the TableNewRow datatable event (even empty non-null strings), I can edit those rows.




    Imported from legacy forums. Posted by James (had 1183 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.