How to insert a row in a Grid?

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
User avatar
zolysoftsolutions
Posts: 139
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 »

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: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: How to insert a row in a Grid?

Post by KDJ »

Zoli B.

Use AddItemEx method.

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

Set nRow := 1
User avatar
zolysoftsolutions
Posts: 139
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 »

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