Alex Kwitny
Alex Kwitny

Reputation: 11564

When creating a new line in a grid, is there a way to have it create at the bottom instead of the middle of the grid?

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);
}

Upvotes: 4

Views: 4836

Answers (2)

xxinduan
xxinduan

Reputation: 9

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.

Upvotes: 0

Alex Kwitny
Alex Kwitny

Reputation: 11564

Ah figured it out. Just had to check MSDN.

public void create(boolean _append = true)
{
    this.last();
    super(_append);
}

Upvotes: 5

Related Questions