Page 1 of 1

How to insert a row in a Grid?

Posted: Fri Nov 03, 2017 7:46 pm
by zolysoftsolutions
Hello,

How can I insert a row in a Grid?
By example I have 4 records in a grid and I have to insert a new row as first and the rest I want to move down.

The single solution is to move the data in array, sort and move back to the grid? ..or have somebody some more elegant solution?

Thank You.

Zoli B.

Re: How to insert a row in a Grid?

Posted: Fri Nov 03, 2017 8:15 pm
by mol
With virtualgrid it's easy :-)

Re: How to insert a row in a Grid?

Posted: Fri Nov 03, 2017 9:29 pm
by KDJ
Zoli B.

Use AddItemEx method.

From HMG documentation:
<ParentWindowName>.<GridControlName>.AddItemEx ( aItem, nRow )

Set nRow := 1

Re: How to insert a row in a Grid?

Posted: Sat Nov 04, 2017 11:20 am
by zolysoftsolutions
Thank you very much my friends.