yii2-DynaGrid After changing attribute label, this column becomes hidden for all users - yii2-dynagrid

After changing class, header, label, or attribute.
Each user must go to "Personalize grid settings" and move this column to visible. I want to fix it automatically.

Create a migration
$this->execute("UPDATE dynagrid SET data = REPLACE(data, '6d674618', 'cdb49d00') WHERE id LIKE 'your-grid-id%'");
cdb49d00 - CRC32 hash key for new column label. Online service to encode it.
DynaGrid::getColumnKey() - here you can see how Column Key is generated. attribute/label/header/class

Related

Hiding data field name in Visio Data Graphic Displayed as Text

I am using Data Graphic to format my shapes. The data field that I am using to specify data graphics is 'name' and the formatting scheme (Displayed As) I am using is 'Text'. But when I do that, it not only shows value against the shapes but also field name i.e. 'name'. I don't want field name to appear, only values. Is it possible?
Data -> Advanced Data Graphics -> Available Data Graphics
In Edit Data Graphics window select Edit Item
In Edit Item window select field Label position and change it value to No show
Sorry last screenshot with Russian interface :(
I figured it out -- basically Label field has to be made blank , by default it is [Default].

Visio - How to use the same shape property for many shapes

I have created one master shape with many properties. In the "Define Shape Data" windows of the master shape (of the document stencil), one of the properties (masterProp) is a variable list (so with a list of allowed values).
Is it possible to re-use the list of values allowed for this property (masterProp) to define the format of another property of type variable list in another master shape so that the list of values has to be maintained only once ?
Maybee is there a way to set up "lists" in Visio and link the expected/allowed values (format field) of a property to this list (without using excel) ?
Thanks for your advises,
Is it possible to use the same property (masterProp) in another master
shape to inherit the same allowed values? Or is it possible to link
the values of another property of type fixed list in another master
shape to the values of this masterProp property ?
You mean mastershape in document stencil or in external stencil ?
You can refer to some cell of mastershape in document stencil
To reference a cell of
Use this syntax
Example
A master
Masters[MasterName]!SheetName!CellReference
Masters[Gear]!Shaft!Geometry1.X1
About Cell References
Well, Thanks to #Surrodate, this is the correct way of doing this:
Add a user-defined cell in the ShapeSheet of the document (or the page)
Open the master shape for editing
In the master shape, open the shapesheet of the master shape and go to the section of the Shape Data
In the Format column, refer to your user-defined cell. Begin typing with a "=" otherwise it takes your entry as text (even if it recognise your data ...). To refer to the document, begin with =TheDoc!User... if your data are in the page, begin with ThePage!User... Do not forget to set the type of data to 1 or 4 (in case of list).
Ok, I found the shapeSheet of the Page-1. I added a user-defined
section, then a cell named "User.Softwares". I set the value to
="Soft1;Soft2;Soft3". Correct for list ? Then in the field "Format" of the "Define Shape Data" windows in have written
"Page-1!User.Softwares". Is that the correct way to refer to the
page-1 ? When I click on the property of a shape, it proposes the text
"Page-1!User.Softwares" and not the value of the user-defined cell in
Page-1 ... What is the mistake ?
You must also change Type field ! If in this cell stores 0, it mean "String". if cell value is 1 it mean Fixed list.
You must write Page-1!User.Softwares, without quotation marks !

How to edit a pdf generated using iReport?

I have generated this pdf using iReport. Now while viewing this pdf using document viewer, I need to edit that gross amount field and take print out. No need to saving the edited file. How is this possible?
iReports Custom Fields for columns (sum, average, etc)
Right-Click on Variables and click Create Variable
Click on the new variable
a. Notice the properties on the right
Rename the variable accordingly
Change the Value Class Name to the correct Data Type
a. You can search by clicking the 3 dots
Select the correct type of calculation
Change the Expression
a. Click the little icon
b. Select the column you are looking to do the calculation for
c. Click finish
Set Initial Value Expression to 0
Set the increment type to none
Leave Incrementer Factory Class Name blank
Set the Reset Type (usually report)
Drag a new Text Field to stage (Usually in Last Page Footer, or Column Footer)
Double Click the new Text Field
Clear the expression “Text Field”
Select the new variable
Click finish
Put the new text in a desirable position 

How to mark part dirty when a text field value is changed?

I have Part containing a TreeViewer with Nodes and each Node has a name property. I have a text field to edit the name of the currently selected node. I have bound the current selection and this text field as below:
IViewerObservableValue observedElementSingleSelection = ViewersObservables
.observeSingleSelection(treeViewer);
IObservableValue detailValue = PojoProperties.value(Node.PROPERTY_NAME, String.class)
.observeDetail(observedElementSingleSelection);
ISWTObservableValue observableNameText = WidgetProperties.text(SWT.Modify)
.observe(nameText);
dataBindingContext.bindValue(observableNameText, detailValue);
Now I would like to mark the part with this treeViewer as dirty whenever the user edits the name of any Node.
When this Part opens the Nodes are retrieved from the database and the tree is created. If I add a ModifyListener to the text field to mark the Part dirty then on initial loading the Part is marked dirty, which I do not want. Is there any way to mark the Part dirty only when the user edits the name of any Node but not at the time of initial loading?
I have tried to set UpdateStrategyso that the data binding is one-way i.e. only from view to model, but then on selection the Node name does not appear in the text field.
I have tried with KeyListener, but then I have to filter all non-printable keys to mark the Part as dirty. Is there any better solution?
You could add the ModifyListener after the load has been done, or remove the modify listener while the load is being done, or set a flag during the load that the modify listener can test and not set the part to be dirty.

Update bean properties on button click

I'm new to ZK framework and trying to implement a simple thing but ZK's different approach is boggling my mind:
I have a grid with a model as a Person list. All grid fields are editable textboxes and are populated with Person's name and surname (2 columns). What I'm trying to do is:
-- Implement a "Save All" button, which will bind all changed values to respecting Person's name and surname properties.
Simply, on "Save All" click, save all changed values. But I don't want to change anything before button click, so there will be no #save on textboxes, just #load.
What I did so far:
-- On textboxes' onChange event, save textbox's value on a temporary Person object's property (either name or surname), and add that Person to a changedPersonsList. On SaveAll button's click, replace my model's Persons with changedPersonsList Persons... But then I can't know which Person is which without implementing an ID field.
Everything would be SOO easy if I just can send label values on SaveAll click along with row number.
You can control the timing of data binding with condition keywords..
<textbox value="#load(vm.text) #save(vm.text, before='saveAll')"/>
<button onClick="#command('saveAll')"/>
Here we use the before condition to coordinate when the value should be saved: not when it is changing (like normal) but when the saveAll command is about to be executed.
You can read more about this in the ZK documentation.