4

Is there a way during record creation (Ctrl+N) to have the line be created automatically at the end of the grid instead of right in the middle?

I know this is just visually where it creates it, but it still creates some confusion.

This is what I've done so far on the datasource, but it's not working right:

public void create(boolean _append = false)
{
    this.setPosition(MyTable.RowCount());

    super(_append);
}
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71

2 Answers2

5

Ah figured it out. Just had to check MSDN.

public void create(boolean _append = true)
{
    this.last();
    super(_append);
}
Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71
  • I usually think it's best practice to emphasize when overloading that the defaults are being overridden for the purpose of upgrades. I can't tell you how many times I've seen a code migration/merge and missed changes to the function declaration. – Alex Kwitny Jun 28 '12 at 15:41
0

In my testing if the grid already has lines, the new line always before the last existing line. The added line is the last-second line, cannot be the last one.

xxinduan
  • 13
  • 2