Sin
Sin

Reputation: 1864

Reorder grid toolbar buttons

How can we reorder the buttons in a grid toolbar?

I have defined a button to add rows to grid with a custom logic in my extension and added as a custom tool bar button to the PXGrid. I set the default AddNew button enabled = false.

 public PXAction<RQBiddingVendor> InsertSplitLine;
 [PXUIField(DisplayName = "Insert Line", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
 [PXButton(FieldOrdinal=0)]
 public virtual void insertSplitLine()
 {//SOME LOGIC HERE TO INSERT RECORD TO CACHE}

Now the custom button is showing as third. REFRESH, DELETE, INSERT enter image description here

I would like to move the insert before delete. tried using the field ordinal but doesnt work. how can we achieve this?

Upvotes: 1

Views: 295

Answers (1)

Sin
Sin

Reputation: 1864

I found a way to achieve this.

I set the following

Grid > ActionBar > GroupIndex = 1, Order = 1

Grid >> ActionBar-CustomItems > ActionBar > GroupIndex = 1, Order = 0

Upvotes: 1

Related Questions