Skip to main content

Hello All,

 

I have a custom screen that is built with a grid and allows deleting the row of the grid when a condition is met. I have had this code (sample below) for a while which worked fine but when the same code was upgraded to 24 R1 it stopped displaying the delete button on the row entirely. Can you please point out what could have changed with 24 R1?

 

This code is both in the RowSelected of the header DAC and grid DAC:

if (true) {

this.Cachesetypeof(DAC)].AllowInsert =
this.Cachesetypeof(DAC)].AllowUpdate =
this.Cachesetypeof(DAC)].AllowDelete = false;

View.AllowDelete = false;
View.AllowInsert = false;
View.AllowUpdate = false;

}

else {

this.Cachesetypeof(DAC)].AllowInsert =
this.Cachesetypeof(DAC)].AllowUpdate =
this.Cachesetypeof(DAC)].AllowDelete = true;

View.AllowDelete = true;
View.AllowInsert = true;
View.AllowUpdate = true;

}

 

Is the code that you entered above the actual code or did you re-type it? Because the three lines of this.Caches while syntactically will compile, I don’t think it is what you actually meant to write.


Hi @Django the code above is retyped but this.Caches is part of the original where the DAC would be the actual DAC name. This screen is entirely custom. 


Sorry - just to confirm, your code looks like this:

this.Caches[typeof(DAC)].AllowInsert =
this.Caches[typeof(DAC)].AllowUpdate =
this.Caches[typeof(DAC)].AllowDelete = true;

Or like this:

this.Caches[typeof(DAC)].AllowInsert = true;
this.Caches[typeof(DAC)].AllowUpdate = true;
this.Caches[typeof(DAC)].AllowDelete = true;

@Django  Sorry for the confusion. My code looks like 

this.Cachesetypeof(DAC)].AllowInsert =
this.Cachesetypeof(DAC)].AllowUpdate =
this.Cachesetypeof(DAC)].AllowDelete = true;

I got this reference from standard Acumatica whose code looks like it too.

 


Good lord. @Dmitrii Naumov find out who wrote that code and tell them off. :)

What is the Skin ID for the grid as shown in the screen designer? And do you have any other properties set in the grid?


I tried changing the code style for the boolean setting and it still was the same result.

Skin ID for the grid is DetailsInTab. Below is all I have set for the grid:

<px:PXGrid ID="detgrid" runat="server" Style="z-index: 100;" Width="100%" Height="300px" SkinID="DetailsInTab" PageSize="100" AllowPaging="True">


Reply