How to insert a row in a Grid?

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
User avatar
zolysoftsolutions
Posts: 106
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Contact:

How to insert a row in a Grid?

Post by zolysoftsolutions » Fri Nov 03, 2017 7:46 pm

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.
_______________________________
Open eyes for you!


KDJ
Posts: 209
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: How to insert a row in a Grid?

Post by KDJ » Fri Nov 03, 2017 9:29 pm

Zoli B.

Use AddItemEx method.

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

Set nRow := 1

User avatar
zolysoftsolutions
Posts: 106
Joined: Wed Feb 29, 2012 3:33 am
Location: Gyulakuta, Erdélyország
Contact:

Re: How to insert a row in a Grid?

Post by zolysoftsolutions » Sat Nov 04, 2017 11:20 am

Thank you very much my friends.
_______________________________
Open eyes for you!

Post Reply