how to keep the edit status when add a new dataitem?

3 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    26 posts
    Member since:
    Jan 2016

    Posted 12 Jul Link to this post

    Hi, I use a radgridview ,like this:

    this.gridUserControl.gridview.ItemsSource = xmlElement.ChildNodes;

    add a new dataitem to xmlElement...

    this.gridUserControl.gridview.ItemsSource = xmlElement.ChildNodes; //rebinding

    int i = gridUserControl.gridview.Items.Count;
    XmlElement lastitem = (XmlElement)gridUserControl.gridview.Items[i - 1];
    gridUserControl.gridview.SelectedItem = lastitem;


    I want to go in the edit status when add a new dataitem directly. It works well. But the problem is that I press any key the first time, the edit status will be ended. And the edit cell's value is the only the press key's value. That's inexplicable. Please help me to solve the problem ,thanks!

  2. Stefan X1
    Stefan X1 avatar
    486 posts

    Posted 15 Jul Link to this post

    Hi Jonathan,

    I tried to reproduce the reported behavior, but to no avail. Can you please check out the attached sample application I used for testing? You should be able to see, that  when a new item is added and the control enters edit mode, only when the Enter key is pressed the edit is committed. 

    Additionally, you can take a look at the Managing Data section of RadGridView's online help.

    Best Regards,
    Stefan X1
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft banner
  4. Jonathan
    Jonathan avatar
    26 posts
    Member since:
    Jan 2016

    Posted 29 Jul in reply to Stefan X1 Link to this post

    thank you ,stefan. I think the cause is there are too many events in my program. I'll try your advice to find a solution.
Back to Top