Welcome to the Xceed Community Sign in | Join | Help
Community Search  

question on insertrow

Sort Posts: Previous Next
  •  04-26-2008, 5:51 PM Post no. 11766

    question on insertrow

    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.Add(cColumn);

     /*                  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

  •  04-27-2008, 8:13 AM Post no. 11769 in reply to 11766

    Re: question on insertrow

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

    e.g.:

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

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


    Technical Writer - Xceed Software

    Of all the things I've lost, I miss my mind the most. - Mark Twain
  •  08-01-2008, 1:59 PM Post no. 13838 in reply to 11769

    Re: question on insertrow

    FYI,

     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.

     

    Thanks,

    James

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.