Welcome to the Xceed Community | Help
Community Search  

Empty new Row in DataGrid

Sort Posts: Previous Next
  •  06-17-2008, 5:02 AM Post no. 13017

    Empty new Row in DataGrid

    How can I avoid empty rows in my DataGrid and collection?

    Here is my Senario: I want a new row to be added to the collection only when the ENTER key is pressed. I want to be able to control the insertion of a new row so that I can insert the new row at the top. This works fine so far but what the InsertionRow does is actually not acceptable for my Project. It adds a new empty row to the collection each time the InsertionRow losts focus, and even if all the cells are empty. There should be a way to cancel the insertion of a new row without using the validation method. You might want to ask why? Because I would want the user to partially enter data and the click on another row or navigate some resources and comback to end edit by pressing the ENTER key.

     If there is a way to achieve this, I would appreciate your kind response.

    If its a bug, please let me know when a fix will be available.

     Thanks.

     

     I think personally that the InsertionRow should be controlled separately, It should not allow automatic insertion of a new data row without the user input such as ENTER, or at least provide a configurable behaviour through properties.

  •  06-25-2008, 2:42 AM Post no. 13190 in reply to 13017

    Re: Empty new Row in DataGrid

    * bump *

     

    I'm interested in this question as well Smile


    Kiwi wannabe
  •  06-25-2008, 7:05 PM Post no. 13229 in reply to 13017

    Re: Empty new Row in DataGrid

    You could trying deriving from InsertionRow and overriding EndEdit; however, I am not certain that it will do exactly what you want. The upcoming version of the grid will provide fine-grained" handling of how, if, and when an item is inserted, which would allow you to do what you are describing.

    Technical Writer - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  06-26-2008, 6:43 AM Post no. 13240 in reply to 13229

    Re: Empty new Row in DataGrid

    Hi Jenny,

    thanks for your answer :-)

    I don't think that overriding EndEdit will solve this issue. You would have to keep track of the last pressed Key and if Key != Enter: do nothing? I'll wait for the upcoming release. Do you know when that will be issued?

     

    Cheers,

    Frances


    Kiwi wannabe
    Filed under: ,
  •  06-26-2008, 10:32 AM Post no. 13246 in reply to 13240

    Re: Empty new Row in DataGrid

    It is still too early to promise a release date. We're still on track for summer 2008. (In North American-printed calendars, summer begins on June 20 and ends on September 20). I hope we'll pleasantly surprise you by releasing a whole lot earlier than Sept. 20 Smile.

     


    Odi Kosmatos
    VP, R&D, Xceed
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.